소스 검색

minior tweak

KngStr 4 년 전
부모
커밋
9ad1e7ca04
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Source/ksString.pas

+ 1 - 1
Source/ksString.pas

@@ -100,7 +100,7 @@ begin
   I := 0;
   sPath := ChangeFileExt(Result, '');
   sExt := ExtractFileExt(Result);
-  while FileExists(Result) do begin
+  while FileExists(Result) or DirectoryExists(Result) do begin
     Inc(I);
     Result := Format('%s(%d)%s', [sPath, I, sExt]);
   end;