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

This commit is contained in:
Ty Lamontagne authored and Ty committed 2024-09-29 10:20:31 -04:00
1 parent 02fda478ea
commit 84d16802a3
1 file changed
+4
+4
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)