Răsfoiți Sursa

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.
PouleyKetchoupp 5 ani în urmă
părinte
comite
90b6062ebb
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      drivers/windows/file_access_windows.cpp

+ 1 - 1
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()) {