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