Fix UTF-8 filepath on LLVM MinGW

This commit is contained in:
operatios 2022-09-24 22:37:14 +03:00
parent 6e8a858c45
commit 1668d1ecc5

View File

@ -2597,7 +2597,7 @@ bool FileExists(const std::string &abs_filename, void *) {
} }
#else #else
#ifdef _WIN32 #ifdef _WIN32
#if defined(_MSC_VER) || defined(__GLIBCXX__) #if defined(_MSC_VER) || defined(__GLIBCXX__) || defined(_LIBCPP_VERSION)
FILE *fp = nullptr; FILE *fp = nullptr;
errno_t err = _wfopen_s(&fp, UTF8ToWchar(abs_filename).c_str(), L"rb"); errno_t err = _wfopen_s(&fp, UTF8ToWchar(abs_filename).c_str(), L"rb");
if (err != 0) { if (err != 0) {