FileSystem: Don't pass file access mode into GetWin32Path()

This commit is contained in:
TheLastRar 2025-03-04 19:36:42 +00:00 committed by Ty
parent 1fd22dcc1c
commit 06be543d32
1 changed files with 2 additions and 2 deletions

View File

@ -968,7 +968,7 @@ std::FILE* FileSystem::OpenCFile(const char* filename, const char* mode, Error*
{ {
#ifdef _WIN32 #ifdef _WIN32
const std::wstring wfilename = GetWin32Path(filename); const std::wstring wfilename = GetWin32Path(filename);
const std::wstring wmode = GetWin32Path(mode); const std::wstring wmode = StringUtil::UTF8StringToWideString(mode);
if (!wfilename.empty() && !wmode.empty()) if (!wfilename.empty() && !wmode.empty())
{ {
std::FILE* fp; std::FILE* fp;
@ -1060,7 +1060,7 @@ std::FILE* FileSystem::OpenSharedCFile(const char* filename, const char* mode, F
{ {
#ifdef _WIN32 #ifdef _WIN32
const std::wstring wfilename = GetWin32Path(filename); const std::wstring wfilename = GetWin32Path(filename);
const std::wstring wmode = GetWin32Path(mode); const std::wstring wmode = StringUtil::UTF8StringToWideString(mode);
if (wfilename.empty() || wmode.empty()) if (wfilename.empty() || wmode.empty())
return nullptr; return nullptr;