Skip to content

Commit

Permalink
FindFirst should only filter ATTR_USED, as FindNext does
Browse files Browse the repository at this point in the history
  • Loading branch information
malxau committed Feb 17, 2022
1 parent 3f48ecf commit 9ee462d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lfn.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ WFFindFirst(
lpFind->nSpaceLeft = MAXPATHLEN-nLen-1;

if (lpFind->hFindFile != INVALID_HANDLE_VALUE) {
DWORD compareAttributes;
compareAttributes = lpFind->fd.dwFileAttributes & ATTR_USED;
lpFind->dwAttrFilter = dwAttrFilter;
if ((~dwAttrFilter & lpFind->fd.dwFileAttributes) == 0L ||
if ((~dwAttrFilter & compareAttributes) == 0L ||
WFFindNext(lpFind)) {
return(TRUE);
} else {
Expand Down

0 comments on commit 9ee462d

Please sign in to comment.