Skip to content

Commit f4f5f76

Browse files
committed
Backup and restore: cleanup temp zip
1 parent f091f17 commit f4f5f76

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

common/src/main/java/com/liskovsoft/smartyoutubetv2/common/misc/BackupAndRestoreHelper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public void exportAppMediaFolder() {
6161

6262
if (zipFile.exists()) {
6363
file.copyFrom(zipFile);
64+
// Delete temporary zip
65+
zipFile.delete();
6466
}
6567
}
6668

@@ -174,7 +176,7 @@ public void unpackTempZip(File tempZip) {
174176
}
175177

176178
// Delete the temporary ZIP
177-
//tempZip.delete();
179+
tempZip.delete();
178180
}
179181

180182
private void unpackTempZip(Uri zipUri, Runnable onSuccess, Runnable onError) {

common/src/main/java/com/liskovsoft/smartyoutubetv2/common/misc/BackupAndRestoreManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,8 @@ private void unpackBackupZip() {
375375
for (File file : files) {
376376
if (file.getName().endsWith(".zip")) {
377377
mHelper.unpackTempZip(file);
378-
break;
378+
// More than one zip file
379+
//break;
379380
}
380381
}
381382
}

0 commit comments

Comments
 (0)