Bug: path not resolved before file check

This commit is contained in:
h1531095 2023-01-05 15:19:52 +08:00
parent 9e0909ff0c
commit 7d0cc66090

View File

@ -73,10 +73,9 @@ namespace GameRes.Formats.Emote
var match = PathRe.Match (line); var match = PathRe.Match (line);
if (!match.Success) if (!match.Success)
return null; return null;
var pak_name = match.Groups[1].Value; var pak_name = VFS.CombinePath (dir, match.Groups[1].Value);
if (!VFS.FileExists (pak_name)) if (!VFS.FileExists (pak_name))
return null; return null;
pak_name = VFS.CombinePath (dir, pak_name);
layers.Add (Tuple.Create (pak_name, match.Groups[2].Value)); layers.Add (Tuple.Create (pak_name, match.Groups[2].Value));
} }
if (0 == layers.Count) if (0 == layers.Count)