mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-23 13:54:30 +02:00
Corrected the if-statement && logic for attributes in the findnext loop.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1439 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
07d2b24149
commit
c812a96e85
@ -385,10 +385,14 @@ COUNT dos_findnext(void)
|
|||||||
/* can also find volume labels if you set e.g. D_DIR|D_VOLUME */
|
/* can also find volume labels if you set e.g. D_DIR|D_VOLUME */
|
||||||
UBYTE attr_srch;
|
UBYTE attr_srch;
|
||||||
attr_srch = dmp->dm_attr_srch & ~(D_RDONLY | D_ARCHIVE | D_DEVICE);
|
attr_srch = dmp->dm_attr_srch & ~(D_RDONLY | D_ARCHIVE | D_DEVICE);
|
||||||
if ((attr_srch == D_VOLID && (fnp->f_dir.dir_attrib & D_VOLID)) ||
|
if (attr_srch == D_VOLID)
|
||||||
!(~attr_srch & (D_DIR | D_SYSTEM | D_HIDDEN | D_VOLID) &
|
|
||||||
fnp->f_dir.dir_attrib))
|
|
||||||
{
|
{
|
||||||
|
if (!(fnp->f_dir.dir_attrib & D_VOLID))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if (~attr_srch & (D_DIR | D_SYSTEM | D_HIDDEN | D_VOLID) &
|
||||||
|
fnp->f_dir.dir_attrib)
|
||||||
|
continue;
|
||||||
/* If found, transfer it to the dmatch structure */
|
/* If found, transfer it to the dmatch structure */
|
||||||
memcpy(&SearchDir, &fnp->f_dir, sizeof(struct dirent));
|
memcpy(&SearchDir, &fnp->f_dir, sizeof(struct dirent));
|
||||||
/* return the result */
|
/* return the result */
|
||||||
@ -396,7 +400,6 @@ COUNT dos_findnext(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user