소스 검색

* only call findclose if findfirst succeeded

git-svn-id: trunk@25188 -
Jonas Maebe 12 년 전
부모
커밋
fcbc435435
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      compiler/cfileutl.pas

+ 2 - 2
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);