From cd174cb0da01619e66447a8ca30d83bf05370b97 Mon Sep 17 00:00:00 2001 From: Vitaly Date: Sat, 7 Sep 2024 11:25:09 +0200 Subject: [PATCH] Removed static logger from the FileManager class. --- src/corelib/FileManager.cs | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/corelib/FileManager.cs b/src/corelib/FileManager.cs index 56c070b4..03ecf14e 100644 --- a/src/corelib/FileManager.cs +++ b/src/corelib/FileManager.cs @@ -21,11 +21,6 @@ namespace srcrepair.core /// public static class FileManager { - /// - /// Logger instance for FileManager class. - /// - private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); - /// /// Checks for non-ASCII characters in string. /// @@ -44,18 +39,14 @@ public static bool CheckNonASCII(string Path) /// Full path to file. public static void CreateFile(string FileName) { - try - { - // Generating full path to destination directory... - string Dir = Path.GetDirectoryName(FileName); + // Generating full path to the destination directory... + string DirName = Path.GetDirectoryName(FileName); - // Check if destination directory exists. If not - creating... - if (!Directory.Exists(Dir)) { Directory.CreateDirectory(Dir); } + // Check if the destination directory exists. If not - creating... + if (!Directory.Exists(DirName)) { Directory.CreateDirectory(DirName); } - // Creating a mew empty file... - using (File.Create(FileName)) { /* Nothing here. */ } - } - catch (Exception Ex) { Logger.Warn(Ex); } + // Creating a new empty file... + using (File.Create(FileName)) { /* Nothing here. */ } } ///