summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-10-03 12:00:22 +0200
committerGitHub <noreply@github.com>2016-10-03 12:00:22 +0200
commitbf89f43927d379ac1d0f2e00bcc8bfc9884bf3a9 (patch)
tree1d2a919999133300f24dc4882e92a8bd99436164 /core
parentad280e7bfccc150b81abd999f692bf1219ec87d1 (diff)
parent0866f49f4e2ac6f0400502f5e6ca9a13dd8c7db9 (diff)
Merge pull request #6650 from volzhs/resource-path
Fix error when using 2 or more slashes on resource path
Diffstat (limited to 'core')
-rw-r--r--core/ustring.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp
index f7dcba6b14..2e907381f7 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -3073,6 +3073,11 @@ String String::simplify_path() const {
}
s =s.replace("\\","/");
+ while(true){ // in case of using 2 or more slash
+ String compare = s.replace("//","/");
+ if (s==compare) break;
+ else s=compare;
+ }
Vector<String> dirs = s.split("/",false);
for(int i=0;i<dirs.size();i++) {