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.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@ -183,8 +184,9 @@ public class BackupUtil {
|
||||
try {
|
||||
alreadyCopied += backupFolder(srcFolder, destinationFolder, backupFileSize, alreadyCopied);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
gui.setStatus("Backup caused an error");
|
||||
gui.showError("Backup caused an error: " + e.getMessage());
|
||||
gui.logError(Arrays.toString(e.getStackTrace()));
|
||||
BackupGUI.destroy();
|
||||
backupRunning = false;
|
||||
}
|
||||
return alreadyCopied;
|
||||
|
Loading…
Reference in New Issue
Block a user