fix: handle mount alias
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user