Browse Source

Fixed potential AccessViolation by making log filenames include the second as well

pull/46/head
Anairkoen Schno 5 years ago
parent
commit
7c98602d4c
6 changed files with 4 additions and 3 deletions
  1. +1
    -0
      IPA.Loader/Logging/Printers/GZFilePrinter.cs
  2. +1
    -1
      IPA.Loader/Logging/Printers/GlobalLogFilePrinter.cs
  3. +1
    -1
      IPA.Loader/Logging/Printers/PluginLogFilePrinter.cs
  4. +1
    -1
      IPA.Loader/Logging/Printers/PluginSubLogPrinter.cs
  5. BIN
      Refs/Unity.TextMeshPro.dll
  6. BIN
      Refs/UnityEngine.CoreModule.dll

+ 1
- 0
IPA.Loader/Logging/Printers/GZFilePrinter.cs View File

@ -52,6 +52,7 @@ namespace IPA.Logging.Printers
foreach (var file in fileInfo.Directory.EnumerateFiles("*.log", SearchOption.TopDirectoryOnly))
{
if (file.Equals(fileInfo)) continue;
if (file.Extension == ".gz") continue;
CompressOldLog(file);


+ 1
- 1
IPA.Loader/Logging/Printers/GlobalLogFilePrinter.cs View File

@ -34,7 +34,7 @@ namespace IPA.Logging.Printers
{
var logsDir = new DirectoryInfo("Logs");
logsDir.Create();
var finfo = new FileInfo(Path.Combine(logsDir.FullName, $"{DateTime.Now:yyyy.MM.dd.HH.mm}.log"));
var finfo = new FileInfo(Path.Combine(logsDir.FullName, $"{DateTime.Now:yyyy.MM.dd.HH.mm.ss}.log"));
return finfo;
}
}

+ 1
- 1
IPA.Loader/Logging/Printers/PluginLogFilePrinter.cs View File

@ -23,7 +23,7 @@ namespace IPA.Logging.Printers
{
var logsDir = new DirectoryInfo(Path.Combine("Logs", name));
logsDir.Create();
var finfo = new FileInfo(Path.Combine(logsDir.FullName, $"{DateTime.Now:yyyy.MM.dd.HH.mm}.log"));
var finfo = new FileInfo(Path.Combine(logsDir.FullName, $"{DateTime.Now:yyyy.MM.dd.HH.mm.ss}.log"));
return finfo;
}


+ 1
- 1
IPA.Loader/Logging/Printers/PluginSubLogPrinter.cs View File

@ -24,7 +24,7 @@ namespace IPA.Logging.Printers
{
var logsDir = new DirectoryInfo(Path.Combine("Logs", mainName, name));
logsDir.Create();
var finfo = new FileInfo(Path.Combine(logsDir.FullName, $"{DateTime.Now:yyyy.MM.dd.HH.mm}.log"));
var finfo = new FileInfo(Path.Combine(logsDir.FullName, $"{DateTime.Now:yyyy.MM.dd.HH.mm.ss}.log"));
return finfo;
}


BIN
Refs/Unity.TextMeshPro.dll View File


BIN
Refs/UnityEngine.CoreModule.dll View File


Loading…
Cancel
Save