Fix `..` to root folder in relative include

This commit is contained in:
Ricardo Luís Vaz Silva 2024-01-29 18:57:39 -03:00 committed by Rachael Alexanderson
parent 9712409f08
commit 2002396b8b
1 changed files with 9 additions and 2 deletions

View File

@ -71,9 +71,16 @@ static FString ResolveIncludePath(const FString &path,const FString &lumpname){
{
relativePath = relativePath.Mid(3);
auto slash_index = fullPath.LastIndexOf("/");
if (slash_index != -1) {
if (slash_index != -1)
{
fullPath = fullPath.Mid(0, slash_index);
} else {
}
else if (fullPath.IsNotEmpty())
{
fullPath = "";
}
else
{
pathOk = false;
break;
}