1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-20 14:45:44 +00:00

Fix handling of leading .. in simplify_path

Prior to this `..\..\texture.png` was incorrectly simplified to `texture.png`
This commit is contained in:
demolke
2024-12-05 23:23:53 +01:00
parent eb5103093c
commit 964e2b3a9e
2 changed files with 5 additions and 1 deletions

View File

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