- Blood: let the RFS parser handle forward slashes when cutting out the base directory of a given file name.

This commit is contained in:
Christoph Oelckers 2021-04-09 18:25:32 +02:00
parent 57c7a85d9f
commit 2820c50f3e

View file

@ -656,7 +656,7 @@ void ParseScript(int lumpnum)
if (dword_44CE0[gParseLevel] == 0) if (dword_44CE0[gParseLevel] == 0)
{ {
// In the RFS files I have seen the outermost directory is not part of what goes into the file system. // In the RFS files I have seen the outermost directory is not part of what goes into the file system.
auto inp1 = strchr(inp, '\\'); auto inp1 = strpbrk(inp, "/\\");
if (!inp1 || !fileSystem.CreatePathlessCopy(inp1 + 1, ID, nFlags)) if (!inp1 || !fileSystem.CreatePathlessCopy(inp1 + 1, ID, nFlags))
{ {
// I'll activate this when I find evidence that it is needed. Otherwise the risk of picking up unwanted data is too high. // I'll activate this when I find evidence that it is needed. Otherwise the risk of picking up unwanted data is too high.