Fix error when use relative #include in .gdshader / .gdshaderinc file

This commit is contained in:
jsjtxietian
2024-08-06 12:43:35 +08:00
parent 3978628c6c
commit 6cf9af2817
3 changed files with 5 additions and 9 deletions

View File

@ -4384,10 +4384,7 @@ String String::simplify_path() const {
dirs.remove_at(i);
i--;
} else if (d == "..") {
if (i == 0) {
dirs.remove_at(i);
i--;
} else {
if (i != 0) {
dirs.remove_at(i);
dirs.remove_at(i - 1);
i -= 2;