diff --git a/Source/utils/file_util.cpp b/Source/utils/file_util.cpp index 0fad6cde1..7a4ce20d7 100644 --- a/Source/utils/file_util.cpp +++ b/Source/utils/file_util.cpp @@ -54,7 +54,7 @@ bool FileExists(const char *path) return false; } if (!::PathFileExistsW(&pathUtf16[0])) { - if (::GetLastError() == ERROR_FILE_NOT_FOUND) { + if (::GetLastError() == ERROR_FILE_NOT_FOUND || ::GetLastError() == ERROR_PATH_NOT_FOUND) { ::SetLastError(ERROR_SUCCESS); } else { LogError("PathFileExistsW: error code {}", ::GetLastError());