Merge pull request #385 from operatios/master

Fix UTF-8 filepath on LLVM MinGW
This commit is contained in:
Syoyo Fujita 2022-09-25 05:35:36 +09:00 committed by GitHub
commit 9bb5806df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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