[FileUtil] windows directories fix (#352)

This commit is contained in:
ManDude 2021-04-11 02:17:12 +01:00 committed by GitHub
parent 9969445cf7
commit 17b05a9e40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,7 +160,7 @@ std::string base_name(const std::string& filename) {
size_t pos = 0;
assert(!filename.empty());
for (size_t i = filename.size() - 1; i-- > 0;) {
if (filename.at(i) == '/') {
if (filename.at(i) == '/' || filename.at(i) == '\\') {
pos = (i + 1);
break;
}