added two FindCloses

This commit is contained in:
Christian Hammacher 2007-12-16 10:00:08 +00:00
parent 5ed4c27732
commit cfd2011e80
3 changed files with 5 additions and 2 deletions

Binary file not shown.

View File

@ -90,6 +90,7 @@ begin
Result.Add(eSearch.Name)
until FindNext(eSearch) <> 0;
end;
SysUtils.FindClose(eSearch);
end;
end;

View File

@ -206,8 +206,10 @@ end;
function FSize(eFile: String): Cardinal;
var eRec: TSearchRec;
begin
if FindFirst(eFile, faAnyFile, eRec) = 0 then
Result := eRec.Size
if FindFirst(eFile, faAnyFile, eRec) = 0 then begin
Result := eRec.Size;
SysUtils.FindClose(eRec);
end
else
Result := 0;
end;