Fix DoFileSearch for non-ASCII paths on Windows

It didn't work when there were non-ASCII characters
in the directories argument, but it worked fine with
non-ASCII characters in names of found files and folders.
This commit is contained in:
JosJuice 2017-06-28 09:48:28 +02:00
parent 951f6400fb
commit 6f98915c32
1 changed files with 2 additions and 2 deletions

View File

@ -100,12 +100,12 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& directorie
if (recursive)
{
// TODO use fs::directory_options::follow_directory_symlink ?
for (auto& entry : fs::recursive_directory_iterator(fs::path(directory)))
for (auto& entry : fs::recursive_directory_iterator(fs::u8path(directory)))
add_filtered(entry);
}
else
{
for (auto& entry : fs::directory_iterator(fs::path(directory)))
for (auto& entry : fs::directory_iterator(fs::u8path(directory)))
add_filtered(entry);
}
}