diff --git a/ide/cleandirdlg.pas b/ide/cleandirdlg.pas index 4c68c3227f..8858e4bcbc 100644 --- a/ide/cleandirdlg.pas +++ b/ide/cleandirdlg.pas @@ -271,7 +271,7 @@ var FullFilename: String; begin Result:=false; - if (not FileExists(MainDirectory)) or (Lvl>20) then exit; + if (not DirectoryExists(MainDirectory)) or (Lvl>20) then exit; if SysUtils.FindFirst(MainDirectory+FindMask, faAnyFile,FileInfo)=0 then begin @@ -383,7 +383,7 @@ begin // delete them all for i:=0 to List.Count-1 do begin Filename:=List[i]; - writeln('Deleting file ',Filename); + writeln('TCleanDirectoryDialog: Deleting file ',Filename); if FileExists(Filename) then begin repeat if DeleteFile(Filename) then begin diff --git a/ide/main.pp b/ide/main.pp index ba0af59083..07574e1a23 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -8273,13 +8273,13 @@ begin end; if (EnvironmentOptions.LazarusDirectory='') - or not FileExists(EnvironmentOptions.LazarusDirectory) then begin + or not DirectoryExists(EnvironmentOptions.LazarusDirectory) then begin writeln(''); writeln( 'NOTE: Lazarus Source Directory not set! (see Environment Options)'); end; if (EnvironmentOptions.FPCSourceDirectory='') - or not FileExists(EnvironmentOptions.FPCSourceDirectory) then begin + or not DirectoryExists(EnvironmentOptions.FPCSourceDirectory) then begin writeln(''); writeln('NOTE: FPC Source Directory not set! (see Environment Options)'); end; @@ -10247,6 +10247,9 @@ end. { ============================================================================= $Log$ + Revision 1.681 2003/12/20 11:10:35 mattias + fixed a few directory exists checks + Revision 1.680 2003/12/20 01:20:52 mattias splitted output directories for cross compilation diff --git a/lcl/include/filectrl.inc b/lcl/include/filectrl.inc index 620d94435a..9148e18cbf 100644 --- a/lcl/include/filectrl.inc +++ b/lcl/include/filectrl.inc @@ -26,7 +26,7 @@ var begin dirExist := false; - F := FileGetAttr(FileName); + F := FileGetAttr(ChompPathDelim(FileName)); if F <> -1 then if (F and faDirectory) <> 0 then dirExist := true; @@ -896,6 +896,9 @@ end; { $Log$ + Revision 1.37 2003/12/20 11:10:36 mattias + fixed a few directory exists checks + Revision 1.36 2003/11/13 12:47:20 marco * 3 of the four linuxerror occurances fixed