Fix error when using 2 or more slashes on resource path
This commit is contained in:
parent
20c7b65b7e
commit
0866f49f4e
1 changed files with 5 additions and 0 deletions
|
@ -3073,6 +3073,11 @@ String String::simplify_path() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
s =s.replace("\\","/");
|
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);
|
Vector<String> dirs = s.split("/",false);
|
||||||
|
|
||||||
for(int i=0;i<dirs.size();i++) {
|
for(int i=0;i<dirs.size();i++) {
|
||||||
|
|
Loading…
Reference in a new issue