Commit 14dab8ab authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

shlwapi: Always close find handle (Coverity).

parent 0efa2331
......@@ -3885,16 +3885,14 @@ BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
strcpyW(szSearch + dwLen, szAllFiles);
hfind = FindFirstFileW(szSearch, &find_data);
if (hfind != INVALID_HANDLE_VALUE &&
find_data.cFileName[0] == '.' &&
find_data.cFileName[1] == '.')
if (hfind != INVALID_HANDLE_VALUE)
{
/* The only directory entry should be the parent */
if (!FindNextFileW(hfind, &find_data))
retVal = TRUE;
if (find_data.cFileName[0] == '.' && find_data.cFileName[1] == '.')
/* The only directory entry should be the parent */
retVal = !FindNextFileW(hfind, &find_data);
FindClose(hfind);
}
return retVal;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment