summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2020-12-23 23:56:45 +0100
committerGitHub <noreply@github.com>2020-12-23 23:56:45 +0100
commit210ebb04d3330fbbebae6c6b3e517c6254aeec2e (patch)
treef9d93c93e4a9a429b0968ba820559bcb8f3b1252
parentc4c211c3b7608f79457f16bb42ad8839a9cdcf5a (diff)
parent8edacea04a98ac8b87cfa96bfb5af55ff5c1b354 (diff)
Merge pull request #44609 from m4gr3d/fix_top_level_android_export
Fix the `String::get_base_dir()` logic to properly check for top level directories on Windows
-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) {