Fix PathRemoveRelativeParts for rooted paths

This commit is contained in:
mafiesto4
2021-02-08 23:17:50 +01:00
parent b30ab38ef2
commit be7024784e
3 changed files with 3 additions and 3 deletions

View File

@@ -517,7 +517,7 @@ namespace Flax.Build
bool isRooted = path.StartsWith("/");
string result = string.Join(Path.DirectorySeparatorChar.ToString(), stack.Reverse());
if (isRooted)
if (isRooted && result[0] != '/')
result = result.Insert(0, "/");
return result;
}