diff options
-rw-r--r-- | src/SFileListFile.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/SFileListFile.cpp b/src/SFileListFile.cpp index 6ad7ed2..224a288 100644 --- a/src/SFileListFile.cpp +++ b/src/SFileListFile.cpp @@ -597,7 +597,7 @@ bool WINAPI SListFileFindNextFile(HANDLE hFind, SFILE_FIND_DATA * lpFindFileData { TListFileCache * pCache = (TListFileCache *)hFind; size_t nLength; - int nError = ERROR_SUCCESS; + int nError = ERROR_INVALID_PARAMETER; // Check for parameters if(pCache != NULL) @@ -614,13 +614,12 @@ bool WINAPI SListFileFindNextFile(HANDLE hFind, SFILE_FIND_DATA * lpFindFileData // If some mask entered, check it if(CheckWildCard(lpFindFileData->cFileName, pCache->szMask)) + { + nError = ERROR_SUCCESS; break; + } } } - else - { - nError = ERROR_INVALID_PARAMETER; - } if(nError != ERROR_SUCCESS) SetLastError(nError); |