client: fix botched commit from just now

This commit is contained in:
David Anderson 2015-05-04 15:15:25 -07:00
parent 9ea0bb3585
commit 579597be93
1 changed files with 2 additions and 1 deletions

View File

@ -178,7 +178,8 @@ int dir_scan(char* p, DIRREF dirp, int p_len) {
if (p) strlcpy(p, data.cFileName, p_len);
return 0;
} else {
DWORD ret = FindClose(dirp->handle);
DWORD ret = GetLastError();
FindClose(dirp->handle);
dirp->handle = INVALID_HANDLE_VALUE;
if (ret == ERROR_NO_MORE_FILES) {
return ERR_NOT_FOUND;