diff options
| author | shuffle2 <godisgovernment@gmail.com> | 2017-06-28 01:01:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-28 01:01:43 -0700 |
| commit | 17fe293981861b52f8eeb8af6973f3d94a579415 (patch) | |
| tree | 286a7cb85b27ed0088fe1f259c4593910a00158b /Source/Core/Common/FileSearch.cpp | |
| parent | a63ee7872349d89ff8df0930aababf2b4eff3c24 (diff) | |
| parent | 98b0d8a1197c6402b030258685b2eb6e1cd74e39 (diff) | |
Merge pull request #5715 from JosJuice/non-ascii-dofilesearch
Fix DoFileSearch for non-ASCII paths on Windows
Diffstat (limited to 'Source/Core/Common/FileSearch.cpp')
| -rw-r--r-- | Source/Core/Common/FileSearch.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Common/FileSearch.cpp b/Source/Core/Common/FileSearch.cpp index cca5c095f7..2994e00a74 100644 --- a/Source/Core/Common/FileSearch.cpp +++ b/Source/Core/Common/FileSearch.cpp @@ -74,7 +74,7 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& directorie std::vector<fs::path> native_exts; for (const auto& ext : exts) - native_exts.push_back(ext); + native_exts.push_back(fs::u8path(ext)); // N.B. This avoids doing any copies auto ext_matches = [&native_exts](const fs::path& path) { @@ -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); } } |
