FIX: Windows attributes in WfxPluginFileSource

This commit is contained in:
Alexander Koblov 2010-02-04 11:48:48 +00:00
commit 6e384a6f2b
2 changed files with 4 additions and 3 deletions

View file

@ -111,7 +111,8 @@ begin
// Check that attributes is used
if (FindData.FileAttributes and FILE_ATTRIBUTE_UNIX_MODE) = 0 then // Windows attributes
begin
FIsLinkToDirectory := (FindData.FileAttributes and FILE_ATTRIBUTE_REPARSE_POINT) <> 0;
FIsLinkToDirectory := ((FindData.FileAttributes and FILE_ATTRIBUTE_DIRECTORY) <> 0) and
((FindData.FileAttributes and FILE_ATTRIBUTE_REPARSE_POINT) <> 0);
FAttributes:= TNtfsFileAttributesProperty.Create(FindData.FileAttributes);
end
else // Unix attributes

View file

@ -345,7 +345,7 @@ end;
function FPS_ISDIR(iAttr: TFileAttrs) : Boolean;
{$IFDEF MSWINDOWS}
begin
Result := (iAttr and faDirectory <> 0);
Result := (iAttr and FILE_ATTRIBUTE_DIRECTORY <> 0);
end;
{$ELSE}
begin
@ -358,7 +358,7 @@ end;
function FPS_ISLNK(iAttr: TFileAttrs) : Boolean;
{$IFDEF MSWINDOWS}
begin
Result := (iAttr and faSymLink <> 0);
Result := (iAttr and FILE_ATTRIBUTE_REPARSE_POINT <> 0);
end;
{$ELSE}
begin