lazutils: less warnings

git-svn-id: trunk@53137 -
This commit is contained in:
mattias 2016-10-17 13:33:55 +00:00
parent 2ffb2eebdc
commit ad2a1d0c2d
2 changed files with 6 additions and 6 deletions
components/lazutils

View File

@ -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;

View File

@ -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;