shlwapi: Always close find handle (Coverity).
This commit is contained in:
parent
0efa2331e2
commit
14dab8ab4b
|
@ -3885,16 +3885,14 @@ BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
|
||||||
|
|
||||||
strcpyW(szSearch + dwLen, szAllFiles);
|
strcpyW(szSearch + dwLen, szAllFiles);
|
||||||
hfind = FindFirstFileW(szSearch, &find_data);
|
hfind = FindFirstFileW(szSearch, &find_data);
|
||||||
|
if (hfind != INVALID_HANDLE_VALUE)
|
||||||
if (hfind != INVALID_HANDLE_VALUE &&
|
|
||||||
find_data.cFileName[0] == '.' &&
|
|
||||||
find_data.cFileName[1] == '.')
|
|
||||||
{
|
{
|
||||||
|
if (find_data.cFileName[0] == '.' && find_data.cFileName[1] == '.')
|
||||||
/* The only directory entry should be the parent */
|
/* The only directory entry should be the parent */
|
||||||
if (!FindNextFileW(hfind, &find_data))
|
retVal = !FindNextFileW(hfind, &find_data);
|
||||||
retVal = TRUE;
|
|
||||||
FindClose(hfind);
|
FindClose(hfind);
|
||||||
}
|
}
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue