From 06be543d32dc1cd176d68c9c2820d5db85ce166a Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Tue, 4 Mar 2025 19:36:42 +0000 Subject: [PATCH] FileSystem: Don't pass file access mode into GetWin32Path() --- common/FileSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/FileSystem.cpp b/common/FileSystem.cpp index 34be64a1e8..888b985ff9 100644 --- a/common/FileSystem.cpp +++ b/common/FileSystem.cpp @@ -968,7 +968,7 @@ std::FILE* FileSystem::OpenCFile(const char* filename, const char* mode, Error* { #ifdef _WIN32 const std::wstring wfilename = GetWin32Path(filename); - const std::wstring wmode = GetWin32Path(mode); + const std::wstring wmode = StringUtil::UTF8StringToWideString(mode); if (!wfilename.empty() && !wmode.empty()) { std::FILE* fp; @@ -1060,7 +1060,7 @@ std::FILE* FileSystem::OpenSharedCFile(const char* filename, const char* mode, F { #ifdef _WIN32 const std::wstring wfilename = GetWin32Path(filename); - const std::wstring wmode = GetWin32Path(mode); + const std::wstring wmode = StringUtil::UTF8StringToWideString(mode); if (wfilename.empty() || wmode.empty()) return nullptr;