This commit is contained in:
+7
-5
@@ -134,7 +134,7 @@ namespace Elwig {
|
||||
Utils.RunBackground("PDF Initialization", async () => Pdf.Init());
|
||||
Utils.RunBackground("JSON Schema Initialization", BillingData.Init);
|
||||
|
||||
if (Config.BackupAuto) {
|
||||
if (Config.BackupAuto && !Config.Debug) {
|
||||
Utils.RunBackground("Automatisches Backup", async () => {
|
||||
Directory.CreateDirectory(Config.BackupPath);
|
||||
await Task.Delay(500);
|
||||
@@ -219,10 +219,12 @@ namespace Elwig {
|
||||
public async void ShutdownGracefully() {
|
||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||
|
||||
try {
|
||||
await BackupService.TryDatabaseBackup();
|
||||
} catch (Exception exc) {
|
||||
InteractionService.ShowException("Automatisches Backup", exc);
|
||||
if (Config.BackupAuto && !Config.Debug) {
|
||||
try {
|
||||
await BackupService.TryDatabaseBackup();
|
||||
} catch (Exception exc) {
|
||||
InteractionService.ShowException("Automatisches Backup", exc);
|
||||
}
|
||||
}
|
||||
|
||||
SerialPortWatcher.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user