iop/hostfs: don't replace back slashes with forward slashes on Windows

This commit is contained in:
Ty Lamontagne 2024-09-25 18:16:16 -04:00 committed by Ty
parent 02fda478ea
commit 84d16802a3
1 changed files with 4 additions and 0 deletions

View File

@ -153,9 +153,13 @@ namespace R3000A
// the directory is considered non-existant
static __fi std::string clean_path(const std::string& path)
{
#ifndef _WIN32
std::string ret = path;
std::replace(ret.begin(), ret.end(), '\\', '/');
return ret;
#else // This function will cause problems with Windows WSL / device paths where forward slashes are required
return path;
#endif
}
static int host_stat(const std::string& path, fio_stat_t* host_stats, fio_stat_flags& stat = ioman_stat)