reclaim: Bugfix marking last slot on empty volume on reclaim

This commit is contained in:
slederer 2024-11-25 00:08:44 +01:00
parent 4ff6129bc3
commit 3f6e16377f

View file

@ -62,8 +62,13 @@ begin
begin
if lastUsed < endSlot then
begin
writeln('Updating directory...');
(* if the volume is empty mark the first slot *)
if lastUsed = 0 then
slotNo := reservedCount
else
slotNo := lastUsed + 1;
writeln('Updating directory...');
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