summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvolzhs <volzhs@gmail.com>2016-09-30 03:11:45 +0900
committervolzhs <volzhs@gmail.com>2016-09-30 03:11:45 +0900
commit0866f49f4e2ac6f0400502f5e6ca9a13dd8c7db9 (patch)
tree259936a487a11ec1d4d7a6be92fd4397b99f79f1
parent20c7b65b7e3630ada9f2e8b6b64926ec05d68c4c (diff)
Fix error when using 2 or more slashes on resource path
-rw-r--r--core/ustring.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp
index 0d887210c3..a749ce31fc 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++) {