mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-10-31 07:39:42 +01:00
Fix enableBackup option
This commit is contained in:
parent
614aa9d5e5
commit
10435657c5
@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user