From 7c98602d4c19371cd8ed008b3a513be50cc6e01a Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Mon, 27 May 2019 05:20:26 -0500 Subject: [PATCH] Fixed potential AccessViolation by making log filenames include the second as well --- IPA.Loader/Logging/Printers/GZFilePrinter.cs | 1 + .../Logging/Printers/GlobalLogFilePrinter.cs | 2 +- .../Logging/Printers/PluginLogFilePrinter.cs | 2 +- .../Logging/Printers/PluginSubLogPrinter.cs | 2 +- Refs/Unity.TextMeshPro.dll | Bin 84480 -> 84480 bytes Refs/UnityEngine.CoreModule.dll | Bin 613888 -> 613888 bytes 6 files changed, 4 insertions(+), 3 deletions(-) diff --git a/IPA.Loader/Logging/Printers/GZFilePrinter.cs b/IPA.Loader/Logging/Printers/GZFilePrinter.cs index 6d86709f..319548e6 100644 --- a/IPA.Loader/Logging/Printers/GZFilePrinter.cs +++ b/IPA.Loader/Logging/Printers/GZFilePrinter.cs @@ -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); diff --git a/IPA.Loader/Logging/Printers/GlobalLogFilePrinter.cs b/IPA.Loader/Logging/Printers/GlobalLogFilePrinter.cs index 009f3e92..bd36be90 100644 --- a/IPA.Loader/Logging/Printers/GlobalLogFilePrinter.cs +++ b/IPA.Loader/Logging/Printers/GlobalLogFilePrinter.cs @@ -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; } } diff --git a/IPA.Loader/Logging/Printers/PluginLogFilePrinter.cs b/IPA.Loader/Logging/Printers/PluginLogFilePrinter.cs index f7d2770f..34148b52 100644 --- a/IPA.Loader/Logging/Printers/PluginLogFilePrinter.cs +++ b/IPA.Loader/Logging/Printers/PluginLogFilePrinter.cs @@ -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; } diff --git a/IPA.Loader/Logging/Printers/PluginSubLogPrinter.cs b/IPA.Loader/Logging/Printers/PluginSubLogPrinter.cs index 5446f46f..60151b3e 100644 --- a/IPA.Loader/Logging/Printers/PluginSubLogPrinter.cs +++ b/IPA.Loader/Logging/Printers/PluginSubLogPrinter.cs @@ -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; } diff --git a/Refs/Unity.TextMeshPro.dll b/Refs/Unity.TextMeshPro.dll index 5d0b3b45454804b4472436cfcb17a7f5d30f3ab8..8a8bce24e0d0ea4c0681970eaa2588777ab114f6 100644 GIT binary patch delta 42 ycmZpe!rCx}bwUSo!}8aS-CMgEZPf%`hOiiEE-G@EklJ9wye)D5_8V%98p;51*bsXF delta 42 zcmV+_0M-A1lm&p41(1jX-df~=i?xdZJth$RO|OYJT7pc!!jN*8c>%Gv*d_reBay=r APyhe` diff --git a/Refs/UnityEngine.CoreModule.dll b/Refs/UnityEngine.CoreModule.dll index 35f576f77b05a97f3c74f71f2e4f2114d37d02b3..b90fbc70c8954fbd8f14dfe4b2ed570e690069f7 100644 GIT binary patch delta 43 scmZqJquKyOEsQNpEzB(}TUf)w7)9H|!&rfs4T#x+m}7f*80SiM07AA6-v9sr delta 43 scmZqJquKyOEsQNpEzB(}TUf)w7=_!z!&rfs4T#x+m}7f*80SiM078fj-2eap