mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Fix error when using 2 or more slashes on resource path
This commit is contained in:
parent
20c7b65b7e
commit
0866f49f4e
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user