Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Flatpak/io.github.TeamWheelWizard.WheelWizard.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
</provides>

<releases>
<release version="2.4.9" date="2026-06-01"/>
<release version="2.4.8" date="2026-06-01"/>
<release version="2.4.7" date="2026-05-27"/>
<release version="2.4.6" date="2026-05-27"/>
Expand Down
20 changes: 10 additions & 10 deletions WheelWizard/Features/CustomDistributions/RetroRewindBeta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion WheelWizard/WheelWizard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<NoWarn>$(NoWarn);AVLN3001</NoWarn>

<!-- Program details -->
<Version>2.4.8</Version>
<Version>2.4.9</Version>
<Description>This program will manage RetroRewind and mods :)</Description>
<Copyright>GNU v3.0</Copyright>
<RepositoryUrl>https://github.com/patchzyy/WheelWizard</RepositoryUrl>
Expand Down
Loading