mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 17:35:55 +08:00
commit
aaf631c984
@ -2851,7 +2851,7 @@ bool FileExists(const std::string &abs_filename, void *) {
|
||||
}
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#if defined(_MSC_VER) || defined(__GLIBCXX__) || defined(_LIBCPP_VERSION)
|
||||
#if defined(_MSC_VER) || defined(_LIBCPP_VERSION)
|
||||
|
||||
// First check if a file is a directory.
|
||||
DWORD result = GetFileAttributesW(UTF8ToWchar(abs_filename).c_str());
|
||||
@ -2867,6 +2867,11 @@ bool FileExists(const std::string &abs_filename, void *) {
|
||||
if (err != 0) {
|
||||
return false;
|
||||
}
|
||||
#elif defined(__GLIBCXX__)
|
||||
FILE *fp = fopen(abs_filename.c_str(), "rb");
|
||||
if (!fp) {
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
// TODO: is_directory check
|
||||
FILE *fp = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user