From 4c2538b79e49adf2094059c55115955e281bbd08 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Sat, 9 Nov 2002 19:13:56 +0000 Subject: [PATCH] Return DE_NFILES instead of DE_FILE_NOT_FOUND for missing volume labels; search for volume labels too if the attribute just ands with 8. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@460 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/fatdir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/fatdir.c b/kernel/fatdir.c index 225a8b0..6081586 100644 --- a/kernel/fatdir.c +++ b/kernel/fatdir.c @@ -423,7 +423,7 @@ COUNT dos_findfirst(UCOUNT attr, BYTE * name) /* directory and only searched for once. So we need to open */ /* the root and return only the first entry that contains the */ /* volume id bit set. */ - if (attr == D_VOLID) + if (attr & D_VOLID) i = 3; /* Now open this directory so that we can read the */ /* fnode entry and do a match on it. */ @@ -445,7 +445,7 @@ COUNT dos_findfirst(UCOUNT attr, BYTE * name) /* Copy the raw pattern from our data segment to the DTA. */ fmemcpy(dmp->dm_name_pat, SearchDir.dir_name, FNAME_SIZE + FEXT_SIZE); - if (attr == D_VOLID) + if (attr & D_VOLID) { /* Now do the search */ while (dir_read(fnp) == 1) @@ -467,7 +467,7 @@ COUNT dos_findfirst(UCOUNT attr, BYTE * name) /* Now that we've done our failed search, close it and */ /* return an error. */ dir_close(fnp); - return DE_FILENOTFND; + return DE_NFILES; } /* Otherwise just do a normal find next */ else