Use explicit dir_write() instead of letting dir_close() do the writing.

This is to prepare for an updating version to deal with SFTs.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1391 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2009-05-22 00:01:27 +00:00
parent d39420dc11
commit ba75006b67
2 changed files with 5 additions and 5 deletions

View File

@ -289,11 +289,6 @@ VOID dir_close(REG f_node_ptr fnp)
if (fnp == NULL || !(fnp->f_flags & F_DDIR)) if (fnp == NULL || !(fnp->f_flags & F_DDIR))
return; return;
#ifndef IPL
/* Write out the entry */
dir_write(fnp);
#endif
/* Clear buffers after release */ /* Clear buffers after release */
/* hazard: no error checking! */ /* hazard: no error checking! */
flush_buffers(fnp->f_dpb->dpb_unit); flush_buffers(fnp->f_dpb->dpb_unit);

View File

@ -279,6 +279,7 @@ COUNT dos_close(COUNT fd)
} }
fnp->f_flags |= F_DDIR; fnp->f_flags |= F_DDIR;
dir_write(fnp);
dir_close(fnp); dir_close(fnp);
return SUCCESS; return SUCCESS;
} }
@ -519,6 +520,7 @@ STATIC COUNT delete_dir_entry(f_node_ptr fnp)
/* bit before closing it, allowing it to be */ /* bit before closing it, allowing it to be */
/* updated */ /* updated */
fnp->f_flags |= F_DMOD; fnp->f_flags |= F_DMOD;
dir_write(fnp);
dir_close(fnp); dir_close(fnp);
/* SUCCESSful completion, return it */ /* SUCCESSful completion, return it */
@ -728,7 +730,9 @@ COUNT dos_rename(BYTE * path1, BYTE * path2, int attrib)
/* Ok, so we can delete this one. Save the file info. */ /* Ok, so we can delete this one. Save the file info. */
*(fnp1->f_dir.dir_name) = DELETED; *(fnp1->f_dir.dir_name) = DELETED;
dir_write(fnp1);
dir_close(fnp1); dir_close(fnp1);
dir_write(fnp2);
dir_close(fnp2); dir_close(fnp2);
/* SUCCESSful completion, return it */ /* SUCCESSful completion, return it */
@ -1169,6 +1173,7 @@ COUNT dos_mkdir(BYTE * dir)
/* Close the directory so that the entry is updated */ /* Close the directory so that the entry is updated */
fnp->f_flags |= F_DMOD; fnp->f_flags |= F_DMOD;
dir_write(fnp);
dir_close(fnp); dir_close(fnp);
return SUCCESS; return SUCCESS;