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) Result.Add(eSearch.Name)
until FindNext(eSearch) <> 0; until FindNext(eSearch) <> 0;
end; end;
SysUtils.FindClose(eSearch);
end; end;
end; end;

View File

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