FIX: Links handling in WFX plugins

This commit is contained in:
Alexander Koblov 2010-01-21 00:16:14 +00:00
commit df5a1200df
3 changed files with 5 additions and 3 deletions

View file

@ -468,7 +468,7 @@ begin
begin
Connection := TConnection(ConnectionList.Objects[I - RootCount]);
StrPCopy(FindData.cFileName, Connection.ConnectionName);
FindData.dwFileAttributes := FILE_ATTRIBUTE_REPARSE_POINT;
FindData.dwFileAttributes := FILE_ATTRIBUTE_NORMAL;
Inc(ListRec^.Index);
Result := True;
end;

View file

@ -178,6 +178,7 @@ const
const
MAXDWORD = DWORD($FFFFFFFF);
FILE_ATTRIBUTE_NORMAL = 128;
FILE_ATTRIBUTE_DIRECTORY = 16;
FILE_ATTRIBUTE_REPARSE_POINT = $0400;
FILE_ATTRIBUTE_UNIX_MODE = $80000000;

View file

@ -116,7 +116,8 @@ begin
end
else // Unix attributes
begin
FIsLinkToDirectory := ((FindData.FileAttributes and FILE_ATTRIBUTE_DIRECTORY) <> 0) and
FIsLinkToDirectory := (((FindData.FileAttributes and FILE_ATTRIBUTE_DIRECTORY) <> 0) or
((FindData.FileAttributes and FILE_ATTRIBUTE_REPARSE_POINT) <> 0)) and
((FindData.Reserved0 and S_IFMT) = S_IFLNK);
if ((FindData.FileAttributes and FILE_ATTRIBUTE_DIRECTORY) <> 0) and
((FindData.Reserved0 and S_IFMT) <> S_IFDIR) then
@ -235,4 +236,4 @@ begin
end;
end.