From 4b4316ec038eda2b23fcfdcf6e5e1c8be153ca98 Mon Sep 17 00:00:00 2001 From: TTLC198 <41226242+TTLC198@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:51:25 +0300 Subject: [PATCH] Added additional check --- HSMonitor/Utils/Logger/FileLogger.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HSMonitor/Utils/Logger/FileLogger.cs b/HSMonitor/Utils/Logger/FileLogger.cs index 5e18a77..bd75f26 100644 --- a/HSMonitor/Utils/Logger/FileLogger.cs +++ b/HSMonitor/Utils/Logger/FileLogger.cs @@ -17,7 +17,8 @@ public FileLogger() _fullFilePath = Path.Combine(App.LogsDirPath, DateTime.Now.ToString("yyyy-MM-dd") + "_log.txt"); if (!Directory.Exists(App.LogsDirPath)) Directory.CreateDirectory(App.LogsDirPath); - DeleteOldLogFiles(); + else + DeleteOldLogFiles(); } public void Info(string format, params object[] args)