fix: handle mount alias

This commit is contained in:
2026-06-18 18:55:46 -03:00
parent 4f360a778b
commit 1dba3568dc
+10 -8
View File
@@ -351,17 +351,19 @@ class Dumper
*/ */
if (!_provider.TryLoadPackage(cleanPath, out IPackage? package)) if (!_provider.TryLoadPackage(cleanPath, out IPackage? package))
{ {
string searchSuffix = cleanPath; string[] pathSegments = cleanPath.Split('/', StringSplitOptions.RemoveEmptyEntries);
if (searchSuffix.StartsWith("/Game/")) if (pathSegments.Length > 1)
searchSuffix = searchSuffix["/Game/".Length..]; {
string innerPath = string.Join('/', pathSegments.Skip(1)) + ".uasset";
if (!searchSuffix.EndsWith(".uasset")) KeyValuePair<string, GameFile> actualFile = _provider.Files.FirstOrDefault(
searchSuffix += ".uasset"; kvp => kvp.Key.EndsWith(innerPath, StringComparison.OrdinalIgnoreCase)
);
KeyValuePair<string, GameFile> actualFile = _provider.Files.FirstOrDefault(kvp => kvp.Key.EndsWith(searchSuffix, StringComparison.OrdinalIgnoreCase)); if (actualFile.Value != null)
if (actualFile.Value != null) _provider.TryLoadPackage(actualFile.Value, out package);
_provider.TryLoadPackage(actualFile.Value, out package); }
} }