diff --git a/progs/reclaim.pas b/progs/reclaim.pas index 6c3584d..9983501 100644 --- a/progs/reclaim.pas +++ b/progs/reclaim.pas @@ -62,8 +62,13 @@ begin begin if lastUsed < endSlot then begin + (* if the volume is empty mark the first slot *) + if lastUsed = 0 then + slotNo := reservedCount + else + slotNo := lastUsed + 1; + writeln('Updating directory...'); - slotNo := lastUsed + 1; getdirslot(volid, slotNo, dirslot, error); if error <> IONoError then begin @@ -119,7 +124,7 @@ begin lastUsed := 0; openvolumeid(volid); - i := volumeTable[volid].startSlot; + i := 0; endSlot := volumeTable[volid].part.dirSize - 1; if verbose then