fix: Remove redundant filepath separator when use applyDir()

close #1661
pull/2239/head
Alex Hua 2024-07-24 23:06:34 +08:00
parent b519ce04e3
commit 89810a0a26
1 changed files with 3 additions and 0 deletions

View File

@ -2108,6 +2108,9 @@ std::string applyDir(const std::string& dir, const std::string& relPath)
s += relPath;
}
else {
while (s.back() == '/' || s.back() == '\\') {
s.pop_back();
}
s += "/";
s += relPath;
}