Dont use cache dir. cache dir might be deleted during big file uploads

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-04-11 16:38:22 +02:00 committed by Alper Öztürk
parent d583a2f62c
commit 123c576399
1 changed files with 1 additions and 1 deletions

View File

@ -548,7 +548,7 @@ public final class EncryptionUtils {
}
public static EncryptedFile encryptFile(Context context, File file, Cipher cipher) throws InvalidParameterSpecException, IOException {
File tempEncryptedFile = File.createTempFile(file.getName(), null, context.getCacheDir());
File tempEncryptedFile = File.createTempFile(file.getName(), null, context.getFilesDir());
encryptFileWithGivenCipher(file, tempEncryptedFile, cipher);
String authenticationTagString = getAuthenticationTag(cipher);
return new EncryptedFile(tempEncryptedFile, authenticationTagString);