Changeset 2795


Ignore:
Timestamp:
Dec 31, 2011, 11:25:58 PM (4 years ago)
Author:
wmb
Message:

OLPC trac #11349 - The generic "$delete1" file command was leaving a directory ihandle open in the case where the file could not be deleted, leading to a delayed action bug that could cause write data not to be flushed from the disk buffer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ofw/core/filecmds.fth

    r1942 r2795  
    296296: $delete1  ( path$ -- )
    297297   open-directory ?dup 0= abort" Can't open directory"      ( name$ dir-ih )
    298    >r  " $delete!" r@ $call-method  abort" Can't delete file"  ( r: dir-ih )
    299    r> close-dev   
     298   >r  " $delete!" r@ $call-method  ( error?  r: dir-ih )
     299   r> close-dev                     ( error? )
     300   abort" Can't delete file" 
    300301;
    301302' $delete1 to _ofdelete
Note: See TracChangeset for help on using the changeset viewer.