From d28b31b385dd9be6a8f1725eb6b78453a345f98b Mon Sep 17 00:00:00 2001 From: ManlyMarco <39247311+ManlyMarco@users.noreply.github.com> Date: Thu, 30 Apr 2026 19:39:55 +0200 Subject: [PATCH 1/4] Add support for game log files saved inside AppData --- src/KKManager.Core/Functions/DebugInfo.cs | 28 ++---- .../Functions/InstallDirectoryHelper.cs | 89 +++++++++++++------ src/KKManager.Core/Util/PathTools.cs | 27 ++++++ 3 files changed, 96 insertions(+), 48 deletions(-) diff --git a/src/KKManager.Core/Functions/DebugInfo.cs b/src/KKManager.Core/Functions/DebugInfo.cs index 7e322d47..1ee60751 100644 --- a/src/KKManager.Core/Functions/DebugInfo.cs +++ b/src/KKManager.Core/Functions/DebugInfo.cs @@ -11,7 +11,7 @@ public static class DebugInfo public static void GenerateDebugInfo(string atPath) { var epoch = new DateTimeOffset(DateTime.Now).ToUnixTimeSeconds().ToString(); - var tempDebugDir = Directory.CreateDirectory(Path.Combine(atPath, $"DebugInfoTemp {epoch}")); + var tempDebugDir = Directory.CreateDirectory(Path.Combine(atPath, $"DebugInfoTemp {epoch}")); try { @@ -21,10 +21,10 @@ public static void GenerateDebugInfo(string atPath) ZipPluginsAndConfig(Path.Combine(tempDebugDir.FullName, "Bepin.zip")); GetLogs(tempDebugDir); - + ZipFile.CreateFromDirectory(tempDebugDir.FullName, Path.Combine(atPath, $"{InstallDirectoryHelper.GameType.GetFancyGameName()} Debug Info {epoch}.zip")); - } + } finally { tempDebugDir.Delete(true); @@ -81,8 +81,8 @@ private static void ListFilesInDirectory(DirectoryInfo dirInfo, int depth, Strin var nameLength = 0; foreach (var file in files) { - if (file.Name.Length > nameLength) - { + if (file.Name.Length > nameLength) + { nameLength = file.Name.Length; //This doesn't handle multibyte Unicode characters correctly } } @@ -153,26 +153,10 @@ private static string RelativePath(string fullPath, string pathRelativeTo) private static void GetLogs(DirectoryInfo debugDirInfo) { - var logOutputFiles = InstallDirectoryHelper.GameDirectory.EnumerateFiles("LogOutput.log*", SearchOption.AllDirectories).ToArray(); - var outputLogFiles = InstallDirectoryHelper.GameDirectory.EnumerateFiles("output_log.txt", SearchOption.AllDirectories).ToArray(); - - if (outputLogFiles.Length == 0) - { - //We are probably on one of the games that logs to AppData/LocalLow, and the user hasn't configured Doorstop to redirect the logs. - //For now just log that this happens instead of trying to traverse the AppData folder (since we'd have to determine the subfolder name in AppData anyway) - Console.WriteLine("Could not locate output_log.txt! Check if redirect_output_log is set to true in doorstop_config.ini"); - } + var logOutputFiles = InstallDirectoryHelper.FindLogFiles(true); foreach (var logFile in logOutputFiles) - { logFile.CopyTo(Path.Combine(debugDirInfo.FullName, logFile.Name), true); - } - - foreach (var outputFile in outputLogFiles) - { - var uniqueName = $"{outputFile.Directory.Name} {outputFile.Name}"; //There may be be multiple output_logs so we have to differentiate them - outputFile.CopyTo(Path.Combine(debugDirInfo.FullName, uniqueName), true); - } } } } diff --git a/src/KKManager.Core/Functions/InstallDirectoryHelper.cs b/src/KKManager.Core/Functions/InstallDirectoryHelper.cs index 50688e99..a0d4aa6d 100644 --- a/src/KKManager.Core/Functions/InstallDirectoryHelper.cs +++ b/src/KKManager.Core/Functions/InstallDirectoryHelper.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Windows.Forms; +using KKManager.Util; namespace KKManager.Functions { @@ -197,32 +198,13 @@ public static void OpenLog() { try { - bool TryOpen(string path) - { - if (path == null) return false; - try - { - Process.Start(path); - return true; - } - catch - { - return false; - } - } - - var rootDir = GameDirectory.FullName; - var candidates = new List(); - - // BepInEx 5.x log file, can be "LogOutput.log.1" or higher if multiple game instances run. - candidates.AddRange(Directory.GetFiles(rootDir, "LogOutput.log*", SearchOption.AllDirectories)); - // Unity built-in log file, by default inside _Data dir, disabled, or somewhere in appdata. Can be moved to game root by BepInEx preloader if configured. - candidates.AddRange(Directory.GetFiles(rootDir, "output_log.txt", SearchOption.AllDirectories)); - - var latestLog = candidates.Where(File.Exists).OrderByDescending(File.GetLastWriteTimeUtc).FirstOrDefault(); - if (TryOpen(latestLog)) return; - - throw new FileNotFoundException("No log files were found"); + var candidates = FindLogFiles(true); + + var latestLog = candidates.FirstOrDefault(); + if (latestLog == null) + throw new FileNotFoundException("No log files were found"); + + Process.Start(latestLog.FullName); } catch (Exception exception) { @@ -230,5 +212,60 @@ bool TryOpen(string path) MessageBox.Show(string.Format(Resources.OpenGameLogFailedMessage, exception.Message), Resources.OpenGameLogMessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } } + + private static readonly Dictionary _AppdataRelativePaths = new Dictionary + { + { GameType.Koikatsu , @"illusion__Koikatu\Koikatu"}, + { GameType.KoikatsuSteam , @"illusion__Koikatsu\Koikatsu Party"}, + { GameType.KoikatsuSunshine , @"illusion__KoikatsuSunshine\KoikatsuSunshine"}, + { GameType.EmotionCreators , @"illusion__EmotionCreators\EmotionCreators"}, + + { GameType.AiShoujo ,@"illusion__AI-Syoujyo\AI-Syoujyo"}, + { GameType.AiShoujoSteam ,@"illusion__AI-Shoujo\AI-Shoujo"}, + { GameType.HoneySelect2 , @"illusion__HoneySelect2\HoneySelect2"}, //TODO: illusion__HoneySelect2_Steam\HoneySelect2_Steam + + { GameType.RoomGirl, @"illusion__RoomGirl\RoomGirl" }, + // VR_Kanojo ILLUSION\VR_Kanojo + + { GameType.HoneyCome ,@"ILLGAMES\HoneyCome"}, + { GameType.HoneyComeSteam ,@"ILLGAMES\HoneyComeccp"}, + { GameType.SamabakeScramble , @"ILLGAMES\SamabakeScramble"}, + { GameType.Aicomi, @"ILLGAMES\Aicomi" }, + }; + + /// + /// Finds log files for the current game. + /// + /// Whether to filter the log files to only include the latest ones. If true, results are ordered by last write time (descending). + /// A list of log files for the current game. + public static List FindLogFiles(bool filter) + { + var candidates = new List(); + // BepInEx 5.x log file, can be "LogOutput.log.1" or higher if multiple game instances run. + candidates.AddRange(GameDirectory.GetFiles("LogOutput.log*", SearchOption.AllDirectories)); + // Unity built-in log file, by default inside _Data dir, disabled, or somewhere in appdata. Can be moved to game root by BepInEx preloader if configured. + candidates.AddRange(GameDirectory.GetFiles("output_log.txt", SearchOption.AllDirectories)); + // Check for log files stored in AppData/LocalLow in case they were not redirected by preloader config + if (_AppdataRelativePaths.TryGetValue(GameType, out var relativePath)) + { + var localLow = PathTools.GetAppDataLocalLowPath(); + var appdataLogPath = Path.Combine(localLow, relativePath); + // It can be either Player.log or output_log.txt depending on Unity version + candidates.AddRange(Directory.GetFiles(appdataLogPath, "Player.log", SearchOption.AllDirectories).Select(x => new FileInfo(x))); + candidates.AddRange(Directory.GetFiles(appdataLogPath, "output_log.txt", SearchOption.AllDirectories).Select(x => new FileInfo(x))); + } + + if (filter) + { + candidates = candidates + // Only keep the latest log file for each name (e.g. in case output_log.txt is both in game root and in appdata) + .GroupBy(x => x.Name).Select(z => z.OrderByDescending(x => x.LastWriteTimeUtc).ThenByDescending(x => x.CreationTimeUtc).First()) + // Order by last write time to have the most recent log on top (e.g. in case output_log.txt and LogOutput.log both exist) + .OrderByDescending(x => x.LastWriteTimeUtc).ThenByDescending(x => x.CreationTimeUtc) + .ToList(); + } + + return candidates; + } } } \ No newline at end of file diff --git a/src/KKManager.Core/Util/PathTools.cs b/src/KKManager.Core/Util/PathTools.cs index c9ea97f5..48a88452 100644 --- a/src/KKManager.Core/Util/PathTools.cs +++ b/src/KKManager.Core/Util/PathTools.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Runtime.InteropServices; using System.Text.RegularExpressions; namespace KKManager.Util @@ -136,5 +137,31 @@ public static string AdjustFormat(string value) } return new string(a); } + + public static string GetAppDataLocalLowPath() + { + Guid localLowId = new Guid("A520A1A4-1780-4FF6-BD18-167343C5AF16"); + return GetKnownFolderPath(localLowId); + } + + private static string GetKnownFolderPath(Guid knownFolderId) + { + IntPtr pszPath = IntPtr.Zero; + try + { + int hr = SHGetKnownFolderPath(knownFolderId, 0, IntPtr.Zero, out pszPath); + if (hr >= 0) + return Marshal.PtrToStringAuto(pszPath); + throw Marshal.GetExceptionForHR(hr); + } + finally + { + if (pszPath != IntPtr.Zero) + Marshal.FreeCoTaskMem(pszPath); + } + } + + [DllImport("shell32.dll")] + private static extern int SHGetKnownFolderPath( [MarshalAs(UnmanagedType.LPStruct)] Guid rfid, uint dwFlags, IntPtr hToken, out IntPtr pszPath); } } From 3942d1b7bb0c55c4612f31d9ed31565da70a5dc1 Mon Sep 17 00:00:00 2001 From: ManlyMarco <39247311+ManlyMarco@users.noreply.github.com> Date: Thu, 30 Apr 2026 19:52:40 +0200 Subject: [PATCH 2/4] Change "Open log file" menu entry to open all recent log files --- .../Functions/InstallDirectoryHelper.cs | 6 +- src/KKManager/Windows/MainWindow.Designer.cs | 26 +- src/KKManager/Windows/MainWindow.resx | 337 +++++++++--------- 3 files changed, 187 insertions(+), 182 deletions(-) diff --git a/src/KKManager.Core/Functions/InstallDirectoryHelper.cs b/src/KKManager.Core/Functions/InstallDirectoryHelper.cs index a0d4aa6d..d1b4d147 100644 --- a/src/KKManager.Core/Functions/InstallDirectoryHelper.cs +++ b/src/KKManager.Core/Functions/InstallDirectoryHelper.cs @@ -200,11 +200,11 @@ public static void OpenLog() { var candidates = FindLogFiles(true); - var latestLog = candidates.FirstOrDefault(); - if (latestLog == null) + if (!candidates.Any()) throw new FileNotFoundException("No log files were found"); - Process.Start(latestLog.FullName); + foreach (var candidate in candidates.Take(3)) + Process.Start(candidate.FullName); } catch (Exception exception) { diff --git a/src/KKManager/Windows/MainWindow.Designer.cs b/src/KKManager/Windows/MainWindow.Designer.cs index 369db9d8..f5ae9b7e 100644 --- a/src/KKManager/Windows/MainWindow.Designer.cs +++ b/src/KKManager/Windows/MainWindow.Designer.cs @@ -70,10 +70,11 @@ private void InitializeComponent() this.useSystemProxyServerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.p2PDownloaderSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.generateDebugInfoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); this.fixFileAndFolderPermissionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.compressGameFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.cleanUpDuplicateZipmodsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.generateDebugInfoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.developersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openModpackToolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -95,7 +96,6 @@ private void InitializeComponent() this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabelStatus = new System.Windows.Forms.ToolStripStatusLabel(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); this.menuStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.SuspendLayout(); @@ -366,6 +366,17 @@ private void InitializeComponent() this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; resources.ApplyResources(this.toolsToolStripMenuItem, "toolsToolStripMenuItem"); // + // generateDebugInfoToolStripMenuItem + // + this.generateDebugInfoToolStripMenuItem.Name = "generateDebugInfoToolStripMenuItem"; + resources.ApplyResources(this.generateDebugInfoToolStripMenuItem, "generateDebugInfoToolStripMenuItem"); + this.generateDebugInfoToolStripMenuItem.Click += new System.EventHandler(this.generateDebugInfoZip_Click); + // + // toolStripSeparator10 + // + this.toolStripSeparator10.Name = "toolStripSeparator10"; + resources.ApplyResources(this.toolStripSeparator10, "toolStripSeparator10"); + // // fixFileAndFolderPermissionsToolStripMenuItem // this.fixFileAndFolderPermissionsToolStripMenuItem.Name = "fixFileAndFolderPermissionsToolStripMenuItem"; @@ -384,12 +395,6 @@ private void InitializeComponent() resources.ApplyResources(this.cleanUpDuplicateZipmodsToolStripMenuItem, "cleanUpDuplicateZipmodsToolStripMenuItem"); this.cleanUpDuplicateZipmodsToolStripMenuItem.Click += new System.EventHandler(this.cleanUpDuplicateZipmodsToolStripMenuItem_Click); // - // generateDebugInfoToolStripMenuItem - // - this.generateDebugInfoToolStripMenuItem.Name = "generateDebugInfoToolStripMenuItem"; - resources.ApplyResources(this.generateDebugInfoToolStripMenuItem, "generateDebugInfoToolStripMenuItem"); - this.generateDebugInfoToolStripMenuItem.Click += new System.EventHandler(this.generateDebugInfoZip_Click); - // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; @@ -526,11 +531,6 @@ private void InitializeComponent() this.toolTip1.ReshowDelay = 100; this.toolTip1.ShowAlways = true; // - // toolStripSeparator10 - // - this.toolStripSeparator10.Name = "toolStripSeparator10"; - resources.ApplyResources(this.toolStripSeparator10, "toolStripSeparator10"); - // // MainWindow // resources.ApplyResources(this, "$this"); diff --git a/src/KKManager/Windows/MainWindow.resx b/src/KKManager/Windows/MainWindow.resx index bdf015ab..987198e7 100644 --- a/src/KKManager/Windows/MainWindow.resx +++ b/src/KKManager/Windows/MainWindow.resx @@ -121,154 +121,16 @@ 17, 17 - - 37, 20 - - - &File - - - 44, 20 - - - &View - - - 43, 20 - - - &Start - - - 98, 20 - - - &Open directory - - - - False - - - 121, 20 - - - Install a new mod... - - - Attempt to install a plugin or a zipmod. -For plugins, patchers and especially non-zipmod mods it's recommended to follow the installation steps provided by the author instead. - - - False - - - 88, 20 - - - &Mod updater - - - 231, 22 - - - Collect game debug info... - - - Create a zip file in the game folder containing files helpful for debugging problems with the game. - - - 228, 6 - - - 231, 22 - - - Fix file and folder permissions - - - This will attempt to fix any file or folder permission issues in the game directory. -Make sure that no other applications are using anything inside the game directory before uisng, otherwise a PC restart might be required to be able to access some of the files again. - - - 231, 22 - - - Compress game files - - - Reduce the size of the game by recompressing its asset bundles with a higher compression level. -Generally safe but might cause issues in rare cases, especially with newer games like RG or HC. If in doubt, back up the abdata and *_Data folders. - - - 231, 22 - - - Clean up duplicate zipmods - - - Attempt to automatically clean up zipmods with the same GUIDs so that only the latest versions are left. - - - 228, 6 - - - 231, 22 - - - Developers - - - 46, 20 - - - &Tools - - - 61, 20 - - - Settings - - - 44, 20 - - - Help - - - 0, 0 - - - - 4, 2, 0, 2 - - - 1012, 24 - - - 0 - - - menuStrip1 - - - menuStrip1 - - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - 197, 22 - Open game log... + Open game log file(s) + + + Find and open the most recently written log file of the current game. + +May open multiple log files if present, e.g. "\BepInEx\LogOutput.log" and "\output_log.txt" 194, 6 @@ -291,11 +153,11 @@ Generally safe but might cause issues in rare cases, especially with newer games Exit - - 233, 22 + + 37, 20 - - Open card browser + + &File 202, 22 @@ -318,6 +180,12 @@ Generally safe but might cause issues in rare cases, especially with newer games Open other folder... + + 233, 22 + + + Open card browser + 230, 6 @@ -354,6 +222,18 @@ Generally safe but might cause issues in rare cases, especially with newer games Open log viewer + + 44, 20 + + + &View + + + 43, 20 + + + &Start + 155, 22 @@ -387,6 +267,29 @@ Generally safe but might cause issues in rare cases, especially with newer games KK Manager + + 98, 20 + + + &Open directory + + + + False + + + 121, 20 + + + Install a new mod... + + + Attempt to install a plugin or a zipmod. +For plugins, patchers and especially non-zipmod mods it's recommended to follow the installation steps provided by the author instead. + + + False + 318, 22 @@ -438,6 +341,56 @@ Generally safe but might cause issues in rare cases, especially with newer games Note: FTP connections are still required even with P2P enabled. + + 88, 20 + + + &Mod updater + + + 231, 22 + + + Collect game debug info... + + + Create a zip file in the game folder containing files helpful for debugging problems with the game. + + + 228, 6 + + + 231, 22 + + + Fix file and folder permissions + + + This will attempt to fix any file or folder permission issues in the game directory. +Make sure that no other applications are using anything inside the game directory before uisng, otherwise a PC restart might be required to be able to access some of the files again. + + + 231, 22 + + + Compress game files + + + Reduce the size of the game by recompressing its asset bundles with a higher compression level. +Generally safe but might cause issues in rare cases, especially with newer games like RG or HC. If in doubt, back up the abdata and *_Data folders. + + + 231, 22 + + + Clean up duplicate zipmods + + + Attempt to automatically clean up zipmods with the same GUIDs so that only the latest versions are left. + + + 228, 6 + 291, 22 @@ -462,6 +415,18 @@ Generally safe but might cause issues in rare cases, especially with newer games Clean up duplicate and invalid zipmods... + + 231, 22 + + + Developers + + + 46, 20 + + + &Tools + 215, 22 @@ -482,6 +447,12 @@ Generally safe but might cause issues in rare cases, especially with newer games If this fails for whatever reason (e.g. recycle bin is full or disabled) the files are deleted permanently. + + 61, 20 + + + Settings + 269, 22 @@ -515,6 +486,40 @@ If this fails for whatever reason (e.g. recycle bin is full or disabled) the fil About + + 44, 20 + + + Help + + + 0, 0 + + + + 4, 2, 0, 2 + + + 1012, 24 + + + 0 + + + menuStrip1 + + + menuStrip1 + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + 121, 23 @@ -545,6 +550,12 @@ If this fails for whatever reason (e.g. recycle bin is full or disabled) the fil 132, 17 + + 48, 17 + + + Status... + 0, 657 @@ -569,12 +580,6 @@ If this fails for whatever reason (e.g. recycle bin is full or disabled) the fil 1 - - 48, 17 - - - Status... - 247, 17 @@ -2466,6 +2471,18 @@ If this fails for whatever reason (e.g. recycle bin is full or disabled) the fil System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + generateDebugInfoToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripSeparator10 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + fixFileAndFolderPermissionsToolStripMenuItem @@ -2484,12 +2501,6 @@ If this fails for whatever reason (e.g. recycle bin is full or disabled) the fil System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - generateDebugInfoToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - toolStripSeparator3 @@ -2604,12 +2615,6 @@ If this fails for whatever reason (e.g. recycle bin is full or disabled) the fil System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - toolStripSeparator10 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - MainWindow From cfdd404eef0610e4533b05b868113e540e5ea6b0 Mon Sep 17 00:00:00 2001 From: ManlyMarco <39247311+ManlyMarco@users.noreply.github.com> Date: Thu, 30 Apr 2026 20:53:35 +0200 Subject: [PATCH 3/4] Update src/KKManager.Core/Functions/InstallDirectoryHelper.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/KKManager.Core/Functions/InstallDirectoryHelper.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/KKManager.Core/Functions/InstallDirectoryHelper.cs b/src/KKManager.Core/Functions/InstallDirectoryHelper.cs index d1b4d147..2f144a90 100644 --- a/src/KKManager.Core/Functions/InstallDirectoryHelper.cs +++ b/src/KKManager.Core/Functions/InstallDirectoryHelper.cs @@ -250,9 +250,12 @@ public static List FindLogFiles(bool filter) { var localLow = PathTools.GetAppDataLocalLowPath(); var appdataLogPath = Path.Combine(localLow, relativePath); - // It can be either Player.log or output_log.txt depending on Unity version - candidates.AddRange(Directory.GetFiles(appdataLogPath, "Player.log", SearchOption.AllDirectories).Select(x => new FileInfo(x))); - candidates.AddRange(Directory.GetFiles(appdataLogPath, "output_log.txt", SearchOption.AllDirectories).Select(x => new FileInfo(x))); + if (Directory.Exists(appdataLogPath)) + { + // It can be either Player.log or output_log.txt depending on Unity version + candidates.AddRange(Directory.GetFiles(appdataLogPath, "Player.log", SearchOption.AllDirectories).Select(x => new FileInfo(x))); + candidates.AddRange(Directory.GetFiles(appdataLogPath, "output_log.txt", SearchOption.AllDirectories).Select(x => new FileInfo(x))); + } } if (filter) From 19a6d57fc011947dc2d3fdb6524150669dc36c65 Mon Sep 17 00:00:00 2001 From: ManlyMarco <39247311+ManlyMarco@users.noreply.github.com> Date: Thu, 30 Apr 2026 20:54:29 +0200 Subject: [PATCH 4/4] Update src/KKManager/Windows/MainWindow.resx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/KKManager/Windows/MainWindow.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KKManager/Windows/MainWindow.resx b/src/KKManager/Windows/MainWindow.resx index 987198e7..81789c0e 100644 --- a/src/KKManager/Windows/MainWindow.resx +++ b/src/KKManager/Windows/MainWindow.resx @@ -367,7 +367,7 @@ For plugins, patchers and especially non-zipmod mods it's recommended to follow This will attempt to fix any file or folder permission issues in the game directory. -Make sure that no other applications are using anything inside the game directory before uisng, otherwise a PC restart might be required to be able to access some of the files again. +Make sure that no other applications are using anything inside the game directory before using, otherwise a PC restart might be required to be able to access some of the files again. 231, 22