Fix enableBackup option

This commit is contained in:
Gabriele C 2015-11-23 20:59:25 +01:00
parent 614aa9d5e5
commit 10435657c5

View File

@ -33,9 +33,14 @@ public class PerformBackup {
} }
/** /**
* Perform a backup with the given reason.
* *
* @param cause BackupCause The cause of the backup.
*/ */
public void doBackup(BackupCause cause) { public void doBackup(BackupCause cause) {
if(!Settings.isBackupActivated) {
ConsoleLogger.showError("Can't perform a Backup: disabled in configuration. Cause of the Backup: " + cause.name());
}
// Check whether a backup should be made at the specified point in time // Check whether a backup should be made at the specified point in time
switch (cause) { switch (cause) {
case START: case START:
@ -50,9 +55,9 @@ public class PerformBackup {
// Do backup and check return value! // Do backup and check return value!
if (doBackup()) { if (doBackup()) {
ConsoleLogger.info("A backup has been performed successfully"); ConsoleLogger.info("A backup has been performed successfully. Cause of the Backup: " + cause.name());
} else { } else {
ConsoleLogger.showError("Error while performing a backup!"); ConsoleLogger.showError("Error while performing a backup! Cause of the Backup: " + cause.name());
} }
} }