mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Retry backup verify and rename with delay.
This commit is contained in:
committed by
Greyson Parrelli
parent
7a7c4c28c2
commit
05c16e4c70
@@ -413,7 +413,7 @@ public class FullBackupExporter extends FullBackupBase {
|
||||
return count;
|
||||
}
|
||||
|
||||
private static long calculateVeryOldStreamLength(@NonNull AttachmentSecret attachmentSecret, @Nullable byte[] random, @NonNull String data) throws IOException {
|
||||
private static long calculateVeryOldStreamLength(@NonNull AttachmentSecret attachmentSecret, @Nullable byte[] random, @NonNull String data) {
|
||||
long result = 0;
|
||||
|
||||
try (InputStream inputStream = openAttachmentStream(attachmentSecret, random, data)) {
|
||||
@@ -425,6 +425,10 @@ public class FullBackupExporter extends FullBackupBase {
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
Log.w(TAG, "Missing attachment: " + e.getMessage());
|
||||
return 0;
|
||||
} catch (IOException e) {
|
||||
Log.w(TAG, "Failed to determine stream length", e);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -708,6 +712,7 @@ public class FullBackupExporter extends FullBackupBase {
|
||||
|
||||
|
||||
public void close() throws IOException {
|
||||
outputStream.flush();
|
||||
outputStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user