From cba949d2ebf82ab12517a74e8e003a428df8c1a9 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Tue, 29 Sep 2026 21:12:15 +0200 Subject: [PATCH] App: Only backup when not in debug mode --- Elwig/App.xaml.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Elwig/App.xaml.cs b/Elwig/App.xaml.cs index d633b3a..f770729 100644 --- a/Elwig/App.xaml.cs +++ b/Elwig/App.xaml.cs @@ -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();