Fix bug in StringUtils::PathRemoveRelativeParts when going up to the Windows drive with relative path bits

This commit is contained in:
Wojtek Figat
2023-05-04 11:54:55 +02:00
parent 05ffaf7cef
commit 1c12e3d530
2 changed files with 14 additions and 4 deletions

View File

@@ -631,11 +631,16 @@ namespace Flax.Build
if (stack.Count != 0)
{
var popped = stack.Pop();
var windowsDriveStart = popped.IndexOf('\\');
if (popped == "..")
{
stack.Push(popped);
stack.Push(bit);
}
else if (windowsDriveStart != -1)
{
stack.Push(popped.Substring(windowsDriveStart + 1));
}
}
else
{