Fix file storage

This commit is contained in:
nielsandriesse
2020-09-03 10:27:00 +10:00
parent 89c2b14494
commit c9e686551f
6 changed files with 48 additions and 41 deletions

View File

@@ -71,7 +71,7 @@ public class LocalBackupJob extends BaseJob {
try {
String backupPassword = BackupPassphrase.get(context);
File backupDirectory = StorageUtil.getBackupDirectory();
File backupDirectory = StorageUtil.getBackupDirectory(context);
String timestamp = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.US).format(new Date());
String fileName = String.format("session-%s.backup", timestamp);
File backupFile = new File(backupDirectory, fileName);
@@ -97,7 +97,7 @@ public class LocalBackupJob extends BaseJob {
throw new IOException("Renaming temporary backup file failed!");
}
BackupUtil.deleteOldBackups();
BackupUtil.deleteOldBackups(context);
} finally {
GenericForegroundService.stopForegroundTask(context);
}