mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 14:19:26 +02:00
fixed a few directory exists checks
git-svn-id: trunk@4917 -
This commit is contained in:
parent
6447d99a32
commit
014aa5c45f
@ -271,7 +271,7 @@ var
|
|||||||
FullFilename: String;
|
FullFilename: String;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
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,
|
if SysUtils.FindFirst(MainDirectory+FindMask,
|
||||||
faAnyFile,FileInfo)=0
|
faAnyFile,FileInfo)=0
|
||||||
then begin
|
then begin
|
||||||
@ -383,7 +383,7 @@ begin
|
|||||||
// delete them all
|
// delete them all
|
||||||
for i:=0 to List.Count-1 do begin
|
for i:=0 to List.Count-1 do begin
|
||||||
Filename:=List[i];
|
Filename:=List[i];
|
||||||
writeln('Deleting file ',Filename);
|
writeln('TCleanDirectoryDialog: Deleting file ',Filename);
|
||||||
if FileExists(Filename) then begin
|
if FileExists(Filename) then begin
|
||||||
repeat
|
repeat
|
||||||
if DeleteFile(Filename) then begin
|
if DeleteFile(Filename) then begin
|
||||||
|
@ -8273,13 +8273,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if (EnvironmentOptions.LazarusDirectory='')
|
if (EnvironmentOptions.LazarusDirectory='')
|
||||||
or not FileExists(EnvironmentOptions.LazarusDirectory) then begin
|
or not DirectoryExists(EnvironmentOptions.LazarusDirectory) then begin
|
||||||
writeln('');
|
writeln('');
|
||||||
writeln(
|
writeln(
|
||||||
'NOTE: Lazarus Source Directory not set! (see Environment Options)');
|
'NOTE: Lazarus Source Directory not set! (see Environment Options)');
|
||||||
end;
|
end;
|
||||||
if (EnvironmentOptions.FPCSourceDirectory='')
|
if (EnvironmentOptions.FPCSourceDirectory='')
|
||||||
or not FileExists(EnvironmentOptions.FPCSourceDirectory) then begin
|
or not DirectoryExists(EnvironmentOptions.FPCSourceDirectory) then begin
|
||||||
writeln('');
|
writeln('');
|
||||||
writeln('NOTE: FPC Source Directory not set! (see Environment Options)');
|
writeln('NOTE: FPC Source Directory not set! (see Environment Options)');
|
||||||
end;
|
end;
|
||||||
@ -10247,6 +10247,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$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
|
Revision 1.680 2003/12/20 01:20:52 mattias
|
||||||
splitted output directories for cross compilation
|
splitted output directories for cross compilation
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ var
|
|||||||
begin
|
begin
|
||||||
dirExist := false;
|
dirExist := false;
|
||||||
|
|
||||||
F := FileGetAttr(FileName);
|
F := FileGetAttr(ChompPathDelim(FileName));
|
||||||
if F <> -1 then
|
if F <> -1 then
|
||||||
if (F and faDirectory) <> 0 then
|
if (F and faDirectory) <> 0 then
|
||||||
dirExist := true;
|
dirExist := true;
|
||||||
@ -896,6 +896,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
Revision 1.36 2003/11/13 12:47:20 marco
|
||||||
* 3 of the four linuxerror occurances fixed
|
* 3 of the four linuxerror occurances fixed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user