summaryrefslogtreecommitdiff
path: root/drivers/windows
diff options
context:
space:
mode:
authorNathan Franke <natfra@pm.me>2020-07-06 01:17:16 -0500
committerNathan Franke <natfra@pm.me>2020-07-06 11:32:05 -0500
commit09aeb7706b80e72f44fa3397507ff5322b34c7da (patch)
treee8c525038cc8cb04a3309bc26dcd215a1840d664 /drivers/windows
parenta8e330ea1974f0bc692f7efac0165142d4b01de8 (diff)
Fix Directory Open Check
Diffstat (limited to 'drivers/windows')
-rw-r--r--drivers/windows/dir_access_windows.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index 2653ac1cdb..b8153907a9 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -67,7 +67,11 @@ Error DirAccessWindows::list_dir_begin() {
list_dir_end();
p->h = FindFirstFileExW((current_dir + "\\*").c_str(), FindExInfoStandard, &p->fu, FindExSearchNameMatch, nullptr, 0);
- return (p->h == INVALID_HANDLE_VALUE) ? ERR_CANT_OPEN : OK;
+ if (p->h == INVALID_HANDLE_VALUE) {
+ return ERR_CANT_OPEN;
+ }
+
+ return OK;
}
String DirAccessWindows::get_next() {