summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2019-11-10 09:51:09 +0100
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2019-11-10 09:51:09 +0100
commit90b6062ebbea8f92a52bc621683cfe6ca8852ff4 (patch)
tree47b6e43c1d851b7a5478c203b13a4361060e9a87
parent94f00eb6c5323dff933a4985b60e8ebf9391f940 (diff)
Handle missing file properly when checking for case mismatch
This was causing false alarms to be randomly reported on Windows for files that didn't exist.
-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()) {