diff options
author | volzhs <volzhs@gmail.com> | 2016-09-30 03:11:45 +0900 |
---|---|---|
committer | volzhs <volzhs@gmail.com> | 2016-09-30 03:11:45 +0900 |
commit | 0866f49f4e2ac6f0400502f5e6ca9a13dd8c7db9 (patch) | |
tree | 259936a487a11ec1d4d7a6be92fd4397b99f79f1 | |
parent | 20c7b65b7e3630ada9f2e8b6b64926ec05d68c4c (diff) |
Fix error when using 2 or more slashes on resource path
-rw-r--r-- | core/ustring.cpp | 5 |
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++) { |