1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Fix the String::get_base_dir() logic to properly check for top level directories on Windows.

This commit is contained in:
Fredia Huya-Kouadio
2020-12-23 00:48:18 -08:00
parent 187be733aa
commit 8edacea04a

View File

@@ -4285,7 +4285,10 @@ bool String::is_rel_path() const {
} }
String String::get_base_dir() const { String String::get_base_dir() const {
int basepos = find("://"); int basepos = find(":/");
if (basepos == -1) {
basepos = find(":\\");
}
String rs; String rs;
String base; String base;
if (basepos != -1) { if (basepos != -1) {