Fix Directory Open Check

(cherry picked from commit 09aeb7706b)
This commit is contained in:
Nathan Franke 2020-07-06 01:17:16 -05:00 committed by Rémi Verschelde
parent 3f57cb12b4
commit 3f898f5207
3 changed files with 30 additions and 33 deletions

View file

@ -69,7 +69,11 @@ Error DirAccessWindows::list_dir_begin() {
list_dir_end();
p->h = FindFirstFileExW((current_dir + "\\*").c_str(), FindExInfoStandard, &p->fu, FindExSearchNameMatch, NULL, 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() {