mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 09:13:48 +02:00
lazutils: less warnings
git-svn-id: trunk@53137 -
This commit is contained in:
parent
2ffb2eebdc
commit
ad2a1d0c2d
components/lazutils
@ -447,7 +447,7 @@ end;
|
||||
function DeleteDirectory(const DirectoryName: string; OnlyChildren: boolean): boolean;
|
||||
const
|
||||
//Don't follow symlinks on *nix, just delete them
|
||||
DeleteMask = faAnyFile {$ifdef unix} or faSymLink {$endif unix};
|
||||
DeleteMask = faAnyFile {$ifdef unix} or faSymLink{%H-} {$endif unix};
|
||||
var
|
||||
FileInfo: TSearchRec;
|
||||
CurSrcDir: String;
|
||||
@ -462,7 +462,7 @@ begin
|
||||
continue;
|
||||
CurFilename:=CurSrcDir+FileInfo.Name;
|
||||
if ((FileInfo.Attr and faDirectory)>0)
|
||||
{$ifdef unix} and ((FileInfo.Attr and faSymLink)=0) {$endif unix} then begin
|
||||
{$ifdef unix} and ((FileInfo.Attr and faSymLink{%H-})=0) {$endif unix} then begin
|
||||
if not DeleteDirectory(CurFilename,false) then exit;
|
||||
end else begin
|
||||
if not LazFileUtils.DeleteFileUTF8(CurFilename) then exit;
|
||||
|
@ -384,11 +384,11 @@ begin
|
||||
Result := '[-------]';
|
||||
if (faDirectory and Attr) > 0 then Result[2] := 'D';
|
||||
if (faArchive and Attr) > 0 then Result[3] := 'A';
|
||||
if (faSysFile and Attr) > 0 then Result[4] := 'S';
|
||||
if (faSysFile{%H-} and Attr) > 0 then Result[4] := 'S';
|
||||
if (faReadOnly and Attr) > 0 then Result[5] := 'R';
|
||||
if (faHidden and Attr) > 0 then Result[6] := 'H';
|
||||
if (faVolumeId and Attr) > 0 then Result[7] := 'V';
|
||||
if (faSymLink and Attr) > 0 then Result[8] := 'L';
|
||||
if (faHidden{%H-} and Attr) > 0 then Result[6] := 'H';
|
||||
if (faVolumeId{%H-} and Attr) > 0 then Result[7] := 'V';
|
||||
if (faSymLink{%H-} and Attr) > 0 then Result[8] := 'L';
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user