summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()) {