summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-11-10 10:07:40 +0100
committerGitHub <noreply@github.com>2019-11-10 10:07:40 +0100
commitd65719fb13c4b824340dda10d9b0394a631b27eb (patch)
tree490244047b881b45730cfdfef4fbd0ab7d596acc
parentb2ff90fecf9354c301a100ced8513172f7bb90ba (diff)
parent90b6062ebbea8f92a52bc621683cfe6ca8852ff4 (diff)
Merge pull request #33515 from nekomatata/case-mismatch-file-not-found
Handle missing file properly when checking for case mismatch
-rw-r--r--drivers/windows/file_access_windows.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index fb21c0c5a1..4dc1b74310 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -96,7 +96,7 @@ Error FileAccessWindows::_open(const String &p_path, int p_mode_flags) {
if (p_mode_flags == READ) {
WIN32_FIND_DATAW d;
HANDLE f = FindFirstFileW(path.c_str(), &d);
- if (f) {
+ if (f != INVALID_HANDLE_VALUE) {
String fname = d.cFileName;
if (fname != String()) {