diff --git a/files/dos_fs.c b/files/dos_fs.c index fce3ff8ddbc..90f77e8619d 100644 --- a/files/dos_fs.c +++ b/files/dos_fs.c @@ -1984,7 +1984,7 @@ HANDLE WINAPI FindFirstFileExW( if (!FindNextFileW( handle, data )) { FindClose( handle ); - SetLastError( ERROR_NO_MORE_FILES ); + SetLastError( ERROR_FILE_NOT_FOUND ); break; } return handle;