Make sure no additional slash being added with localize_path
This commit is contained in:
parent
2a4c528d06
commit
02d5591d9d
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue