Fix the logic of String::path_clean_end_slash().

This commit is contained in:
Relintai 2022-07-02 19:55:18 +02:00
parent f81018f712
commit 02af86d362

View File

@ -3571,7 +3571,7 @@ String String::path_clean_end_slash() const {
String ret = *this; String ret = *this;
while (ret.length() > 1 && (ret.ends_with("/") || ret.ends_with("\\"))) { while (ret.length() > 1 && (ret.ends_with("/") || ret.ends_with("\\"))) {
ret.resize(length() - 1); ret.resize(ret.length());
} }
return ret; return ret;