1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Merge pull request #34476 from volzhs/no-slash-localize_path

Make sure no additional slash being added with localize_path
This commit is contained in:
Rémi Verschelde
2020-01-02 19:11:18 +01:00
committed by GitHub

View File

@@ -107,6 +107,10 @@ String ProjectSettings::localize_path(const String &p_path) const {
if (plocal == "") { if (plocal == "") {
return ""; return "";
}; };
// Only strip the starting '/' from 'path' if its parent ('plocal') ends with '/'
if (plocal[plocal.length() - 1] == '/') {
sep += 1;
}
return plocal + path.substr(sep, path.size() - sep); return plocal + path.substr(sep, path.size() - sep);
}; };
} }