Update DefaultIOSystem.cpp

- closes https://github.com/assimp/assimp/issues/5678
pull/5697/head
Kim Kulling 2024-08-02 18:17:34 +02:00 committed by GitHub
parent e63d3ed8e7
commit e288c5d68e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -93,6 +93,10 @@ static std::string WideToUtf8(const wchar_t *in) {
// ------------------------------------------------------------------------------------------------
// Tests for the existence of a file at the given path.
bool DefaultIOSystem::Exists(const char *pFile) const {
if (pFile == nullptr) {
return false;
}
#ifdef _WIN32
struct __stat64 filestat;
if (_wstat64(Utf8ToWide(pFile).c_str(), &filestat) != 0) {