fix: handle mount alias

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