Always delete temporary files on exit

This commit is contained in:
AsamK 2021-01-13 20:56:23 +01:00
parent 0624d6a808
commit 6bd857ad8b
2 changed files with 3 additions and 2 deletions

View file

@ -2141,7 +2141,6 @@ public class Manager implements Closeable {
GroupsV2Operations.GroupOperations groupOperations = groupsV2Operations.forGroup(groupSecretParams);
File tmpFile = IOUtils.createTempFile();
tmpFile.deleteOnExit();
try (InputStream input = messageReceiver.retrieveGroupsV2ProfileAvatar(cdnKey,
tmpFile,
ServiceConfig.AVATAR_DOWNLOAD_FAILSAFE_MAX_SIZE)) {