diff options
| author | volzhs | 2016-09-30 03:11:45 +0900 |
|---|---|---|
| committer | Rémi Verschelde | 2016-10-09 17:23:53 +0200 |
| commit | 721599c797c6e3fe59d4bc1c7a18c4448f0538da (patch) | |
| tree | cccf625cbff158a49ae7d49c1af607032d7b53f4 /core/ustring.cpp | |
| parent | ab231cd3fb4c0ec24ac43d05e898d3ddff794384 (diff) | |
| download | godot-721599c797c6e3fe59d4bc1c7a18c4448f0538da.tar.gz godot-721599c797c6e3fe59d4bc1c7a18c4448f0538da.tar.zst godot-721599c797c6e3fe59d4bc1c7a18c4448f0538da.zip | |
Fix error when using 2 or more slashes on resource path
(cherry picked from commit 0866f49f4e2ac6f0400502f5e6ca9a13dd8c7db9)
Diffstat (limited to '')
| -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 0d887210c..a749ce31f 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++) { |
