diff --git a/core/ustring.cpp b/core/ustring.cpp index 78685a44b01..84c6eebbf98 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3970,7 +3970,10 @@ bool String::is_rel_path() const { String String::get_base_dir() const { - int basepos = find("://"); + int basepos = find(":/"); + if (basepos == -1) { + basepos = find(":\\"); + } String rs; String base; if (basepos != -1) {