mirror of
https://github.com/yuzu-emu/yuzu-mainline
synced 2024-11-26 15:48:18 +00:00
common/file_util: Let std::filesystem cast from UTF16 to std::string
Fix invalid encoding paths when iterating over a directory on Windows.
This commit is contained in:
parent
6d6115475b
commit
bab9cae71f
1 changed files with 1 additions and 1 deletions
|
@ -239,7 +239,7 @@ bool ForeachDirectoryEntry(u64* num_entries_out, const std::string& directory,
|
||||||
}
|
}
|
||||||
// windows loop
|
// windows loop
|
||||||
do {
|
do {
|
||||||
const std::string virtual_name(Common::UTF16ToUTF8(ffd.cFileName));
|
const std::string virtual_name = std::filesystem::path(ffd.cFileName).string();
|
||||||
#else
|
#else
|
||||||
DIR* dirp = opendir(directory.c_str());
|
DIR* dirp = opendir(directory.c_str());
|
||||||
if (!dirp)
|
if (!dirp)
|
||||||
|
|
Loading…
Reference in a new issue