Remove the 65535 check for root directories. It's checked against

a different limit later anyway later, and it breaks remove_lfn_entries...


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@812 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2004-03-22 15:43:56 +00:00
parent 11a7b69e5c
commit c73ee8084a
2 changed files with 8 additions and 4 deletions

View File

@ -212,9 +212,11 @@ COUNT dir_read(REG f_node_ptr fnp)
REG UWORD secsize = fnp->f_dpb->dpb_secsize;
unsigned new_diroff = fnp->f_diroff;
/* can't have more than 65535 directory entries */
if (new_diroff == 65535)
return DE_SEEK;
/* can't have more than 65535 directory entries
remove lfn entries may call us with new_diroff == -1
for root directories though */
if (!fnp->f_flags.f_droot && new_diroff >= 65535U)
return DE_SEEK;
/* Directories need to point to their current offset, not for */
/* next op. Therefore, if it is anything other than the first */

View File

@ -451,7 +451,9 @@ COUNT remove_lfn_entries(f_node_ptr fnp)
if (fnp->f_diroff == 0)
break;
fnp->f_diroff -= 2;
/* it cannot / should not get below 0 because of '.' and '..' */
/* it cannot / should not get below 0 because of '.' and '..'
* except for root directories... but then dir_read() makes it 0
* again */
if (dir_read(fnp) <= 0) {
dir_close(fnp);
return DE_BLKINVLD;