From 13a5fa7c0238de2d6cbdffa14c5dac3d7b0ab986 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Wed, 18 May 2022 11:45:31 +0200 Subject: [PATCH] Misc --- ArchiSteamFarm/IPC/ArchiKestrel.cs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/ArchiSteamFarm/IPC/ArchiKestrel.cs b/ArchiSteamFarm/IPC/ArchiKestrel.cs index c1e457fde..73d339878 100644 --- a/ArchiSteamFarm/IPC/ArchiKestrel.cs +++ b/ArchiSteamFarm/IPC/ArchiKestrel.cs @@ -81,19 +81,17 @@ internal static class ArchiKestrel { bool customConfigExists = File.Exists(customConfigPath); - if (customConfigExists) { - if (Debugging.IsDebugConfigured) { - try { - string json = await File.ReadAllTextAsync(customConfigPath).ConfigureAwait(false); + if (customConfigExists && Debugging.IsDebugConfigured) { + try { + string json = await File.ReadAllTextAsync(customConfigPath).ConfigureAwait(false); - if (!string.IsNullOrEmpty(json)) { - JObject jObject = JObject.Parse(json); + if (!string.IsNullOrEmpty(json)) { + JObject jObject = JObject.Parse(json); - ASF.ArchiLogger.LogGenericDebug($"{SharedInfo.IPCConfigFile}: {jObject.ToString(Formatting.Indented)}"); - } - } catch (Exception e) { - ASF.ArchiLogger.LogGenericException(e); + ASF.ArchiLogger.LogGenericDebug($"{SharedInfo.IPCConfigFile}: {jObject.ToString(Formatting.Indented)}"); } + } catch (Exception e) { + ASF.ArchiLogger.LogGenericException(e); } }