mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-28 12:58:05 +03:00
Merge pull request #13497 from hoogmin/modernize_fs_path
Core/Common/FileUtil.cpp: Use std path utility for automatic path separator handling.
This commit is contained in:
commit
50026ab795
1 changed files with 1 additions and 6 deletions
|
@ -442,12 +442,7 @@ FSTEntry ScanDirectoryTree(std::string directory, bool recursive)
|
||||||
|
|
||||||
auto path_to_physical_name = [](const fs::path& path) {
|
auto path_to_physical_name = [](const fs::path& path) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// TODO Ideally this would not be needed - dolphin really should not have code directly mucking
|
return WStringToUTF8(path.generic_wstring());
|
||||||
// about with directory separators (for host paths - emulated paths may require it) and instead
|
|
||||||
// use fs::path to interact with them.
|
|
||||||
auto wpath = path.wstring();
|
|
||||||
std::ranges::replace(wpath, L'\\', L'/');
|
|
||||||
return WStringToUTF8(wpath);
|
|
||||||
#else
|
#else
|
||||||
return PathToString(path);
|
return PathToString(path);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue