Improves behavior when an error occurs during backup
This commit is contained in:
parent
c26a3bc3b5
commit
65ede11ab5
@ -15,6 +15,7 @@ import java.io.OutputStream;
|
|||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@ -183,8 +184,9 @@ public class BackupUtil {
|
|||||||
try {
|
try {
|
||||||
alreadyCopied += backupFolder(srcFolder, destinationFolder, backupFileSize, alreadyCopied);
|
alreadyCopied += backupFolder(srcFolder, destinationFolder, backupFileSize, alreadyCopied);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
gui.showError("Backup caused an error: " + e.getMessage());
|
||||||
gui.setStatus("Backup caused an error");
|
gui.logError(Arrays.toString(e.getStackTrace()));
|
||||||
|
BackupGUI.destroy();
|
||||||
backupRunning = false;
|
backupRunning = false;
|
||||||
}
|
}
|
||||||
return alreadyCopied;
|
return alreadyCopied;
|
||||||
|
Loading…
Reference in New Issue
Block a user