Version 1.2.0

This commit is contained in:
Junior 2024-01-04 22:59:30 -03:00
parent 9b3a0e00a2
commit e74d93fab9
83 changed files with 110087 additions and 47507 deletions

View file

@ -1,4 +1,4 @@
namespace RHLauncher.Helper;
namespace RHLauncher.RHLauncher.Helper;
public class Logger
{
@ -13,10 +13,14 @@ public class Logger
// Create log file with today's date
logFilePath = Path.Combine(logFilePath, "Log-" + DateTime.Today.ToString("MM-dd-yyyy") + ".txt");
FileInfo logFileInfo = new(logFilePath);
DirectoryInfo logDirInfo = new(logFileInfo.DirectoryName);
if (!logDirInfo.Exists)
if (logFileInfo.DirectoryName != null)
{
logDirInfo.Create();
DirectoryInfo logDirInfo = new(logFileInfo.DirectoryName);
if (!logDirInfo.Exists)
{
logDirInfo.Create();
}
}
// Write log entry to file
@ -28,4 +32,5 @@ public class Logger
streamWriter.WriteLine("Message: {0}", message);
streamWriter.WriteLine("---------------------------");
}
}