mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 21:32:19 +00:00
Make an attempt to store/retrieve backups from removable storage
Fixes #7521
This commit is contained in:
@@ -50,7 +50,7 @@ public class LocalBackupJob extends ContextJob {
|
||||
|
||||
try {
|
||||
String backupPassword = TextSecurePreferences.getBackupPassphrase(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("signal-%s.backup", timestamp);
|
||||
File backupFile = new File(backupDirectory, fileName);
|
||||
@@ -76,7 +76,7 @@ public class LocalBackupJob extends ContextJob {
|
||||
throw new IOException("Renaming temporary backup file failed!");
|
||||
}
|
||||
|
||||
BackupUtil.deleteOldBackups();
|
||||
BackupUtil.deleteOldBackups(context);
|
||||
} finally {
|
||||
GenericForegroundService.stopForegroundTask(context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user