summaryrefslogtreecommitdiff
path: root/UChecksumDruid.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UChecksumDruid.pas')
-rw-r--r--UChecksumDruid.pas17
1 files changed, 13 insertions, 4 deletions
diff --git a/UChecksumDruid.pas b/UChecksumDruid.pas
index 34a2570..346dc3f 100644
--- a/UChecksumDruid.pas
+++ b/UChecksumDruid.pas
@@ -444,7 +444,10 @@ begin
MaxSize := 0;
for i := 0 to FileNames.Count - 1 do begin
Stat := Engine.GetFileInfoSL(FileNames[i]);
- if Assigned(Stat) then Inc(MaxSize, Stat.Size);
+ if Assigned(Stat) then begin
+ Inc(MaxSize, Stat.Size);
+ FreeDataItem(Stat);
+ end;
end;
Progress.Max := MaxSize;
Progress.Value := 0;
@@ -466,7 +469,10 @@ begin
(i = FileNames.Count - 1) or SeparateFileCheckBox.Checked);
end;
except end;
- if Assigned(Stat) then Progress.Value := LastValue + Stat.Size;
+ if Assigned(Stat) then begin
+ Progress.Value := LastValue + Stat.Size;
+ FreeDataItem(Stat);
+ end;
Progress.Text := Format('%d %%', [Trunc(Progress.Fraction * 100)]);
Application.ProcessMessages;
CheckStop;
@@ -608,8 +614,11 @@ begin
SysUtils.FormatDateTime('mm.dd.yyyy "at" hh:nn:ss', Now)]);
for i := 0 to FileNames.Count - 1 do begin
Stat := Engine.GetFileInfoSL(FileNames[i]);
- if Assigned(Stat) then s := s + Format('; %s %s %s'#13#10, [PadRightStr(IntToStr(Stat^.Size), 11),
- FormatDate(Stat^.ModifyTime, True, True, 999, 999, 1, '%Y-%m-%d', '%k:%M.%S'), ExtractFileName(FileNames[i])]);
+ if Assigned(Stat) then begin
+ s := s + Format('; %s %s %s'#13#10, [PadRightStr(IntToStr(Stat^.Size), 11),
+ FormatDate(Stat^.ModifyTime, True, True, 999, 999, 1, '%Y-%m-%d', '%k:%M.%S'), ExtractFileName(FileNames[i])]);
+ FreeDataItem(Stat);
+ end;
end;
s := s + '; \----'#13#10'; '#13#10;