summaryrefslogtreecommitdiff
path: root/core/string
diff options
context:
space:
mode:
Diffstat (limited to 'core/string')
-rw-r--r--core/string/ustring.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index d630e987ea..fee168993b 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -4285,7 +4285,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) {