Skip to content

Commit

Permalink
iop/hostfs: don't replace back slashes with forward slashes on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
F0bes committed Sep 29, 2024
1 parent 02fda47 commit 84d1680
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pcsx2/IopBios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 84d1680

Please sign in to comment.