diff --git a/compiler/cfileutl.pas b/compiler/cfileutl.pas index 0bf81248d7..ab1c954a16 100644 --- a/compiler/cfileutl.pas +++ b/compiler/cfileutl.pas @@ -299,8 +299,8 @@ end; DirectoryEntries.Add(Dir.Name,Pointer(Ptrint(Dir.Attr))); end; until findnext(dir) <> 0; + findclose(dir); end; - findclose(dir); end; @@ -1122,8 +1122,8 @@ end; end; end; until findnext(dir) <> 0; + FindClose(dir); end; - FindClose(dir); {$endif usedircache} if not subdirfound then WarnNonExistingPath(currpath);