From 64c45da8026de7c2299c29e7993e0f20da8e8651 Mon Sep 17 00:00:00 2001 From: Patchzy <64382339+patchzyy@users.noreply.github.com> Date: Mon, 1 Jun 2026 03:05:29 +0200 Subject: [PATCH 1/2] Improve archive path handling and error message --- .../CustomDistributions/RetroRewindBeta.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/WheelWizard/Features/CustomDistributions/RetroRewindBeta.cs b/WheelWizard/Features/CustomDistributions/RetroRewindBeta.cs index 86ad4148..4073b831 100644 --- a/WheelWizard/Features/CustomDistributions/RetroRewindBeta.cs +++ b/WheelWizard/Features/CustomDistributions/RetroRewindBeta.cs @@ -211,7 +211,9 @@ out bool badPassword continue; if (!TryGetRelativeExtractionPath(normalized, out var relativePath)) - return Fail("Unexpected file in the test archive. Please contact the developers."); + return Fail( + $"Unexpected file in the test archive: '{entry.Key}' (normalized: '{normalized}'). Please contact the developers." + ); if (!PathSafetyHelper.TryGetPathWithinDirectory(destinationDirectory, relativePath, out var destinationPath)) return Fail("The file path is outside the destination directory. Please contact the developers."); @@ -254,33 +256,31 @@ private static bool IsBadPasswordException(Exception ex) private bool TryGetRelativeExtractionPath(string normalizedPath, out string relativePath) { relativePath = string.Empty; + var archivePath = normalizedPath.Replace(Path.DirectorySeparatorChar, '/').Replace(Path.AltDirectorySeparatorChar, '/'); - if (normalizedPath.Equals(FolderName, StringComparison.OrdinalIgnoreCase)) + if (archivePath.Equals(FolderName, StringComparison.OrdinalIgnoreCase)) { relativePath = FolderName; return true; } - if (normalizedPath.StartsWith($"{FolderName}/", StringComparison.OrdinalIgnoreCase)) + if (archivePath.StartsWith($"{FolderName}/", StringComparison.OrdinalIgnoreCase)) { - relativePath = Path.Combine( - FolderName, - normalizedPath.Substring(FolderName.Length + 1).Replace('/', Path.DirectorySeparatorChar) - ); + relativePath = Path.Combine(FolderName, archivePath.Substring(FolderName.Length + 1).Replace('/', Path.DirectorySeparatorChar)); return true; } - if (normalizedPath.Equals(XMLFolderName, StringComparison.OrdinalIgnoreCase)) + if (archivePath.Equals(XMLFolderName, StringComparison.OrdinalIgnoreCase)) { relativePath = XMLFolderName; return true; } - if (normalizedPath.StartsWith($"{XMLFolderName}/", StringComparison.OrdinalIgnoreCase)) + if (archivePath.StartsWith($"{XMLFolderName}/", StringComparison.OrdinalIgnoreCase)) { relativePath = Path.Combine( XMLFolderName, - normalizedPath.Substring(XMLFolderName.Length + 1).Replace('/', Path.DirectorySeparatorChar) + archivePath.Substring(XMLFolderName.Length + 1).Replace('/', Path.DirectorySeparatorChar) ); return true; } From ebda0894b31d8bb515cb7a5bdbd9721f2e8c6866 Mon Sep 17 00:00:00 2001 From: Patchzy <64382339+patchzyy@users.noreply.github.com> Date: Mon, 1 Jun 2026 03:07:07 +0200 Subject: [PATCH 2/2] Release 2.4.9 --- Flatpak/io.github.TeamWheelWizard.WheelWizard.metainfo.xml | 1 + WheelWizard/WheelWizard.csproj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Flatpak/io.github.TeamWheelWizard.WheelWizard.metainfo.xml b/Flatpak/io.github.TeamWheelWizard.WheelWizard.metainfo.xml index 5ac6b982..6b9ac1f8 100644 --- a/Flatpak/io.github.TeamWheelWizard.WheelWizard.metainfo.xml +++ b/Flatpak/io.github.TeamWheelWizard.WheelWizard.metainfo.xml @@ -55,6 +55,7 @@ + diff --git a/WheelWizard/WheelWizard.csproj b/WheelWizard/WheelWizard.csproj index 742c2544..9a52f084 100644 --- a/WheelWizard/WheelWizard.csproj +++ b/WheelWizard/WheelWizard.csproj @@ -12,7 +12,7 @@ $(NoWarn);AVLN3001 - 2.4.8 + 2.4.9 This program will manage RetroRewind and mods :) GNU v3.0 https://github.com/patchzyy/WheelWizard