From f0da110a834692a62e19ba3c0674eb752c207948 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Wed, 28 Feb 2024 23:39:18 +0100 Subject: [PATCH] Config writing fix https://github.com/seerge/g-helper/issues/2133 --- app/AppConfig.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/AppConfig.cs b/app/AppConfig.cs index 3a114f31..a553c543 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -67,9 +67,17 @@ public static class AppConfig { File.WriteAllText(backup, jsonString); } - catch (Exception ex) + catch (Exception) { - Logger.WriteLine(ex.ToString()); + Thread.Sleep(100); + try + { + File.WriteAllText(backup, jsonString); + } + catch (Exception ex) + { + Logger.WriteLine(ex.Message); + } return; }