anchor.diff:    {$WARN SYMBOL_PLATFORM OFF}
     Result := { default permissions }
       AB_FPERMISSION_OWNERREAD or
  -    AB_FPERMISSION_OWNERWRITE or
  -    AB_FPERMISSION_OWNEREXECUTE or
       AB_FPERMISSION_GROUPREAD or
       AB_FPERMISSION_OTHERREAD;
   
  -  if (Attr and faReadOnly) <> faReadOnly then
  -    Result := Result and not (AB_FPERMISSION_OWNERWRITE or AB_FPERMISSION_OWNEREXECUTE);
  +  if (Attr and faReadOnly) = 0 then
  +    Result := Result or AB_FPERMISSION_OWNERWRITE;
  +
  +  if (Attr and faDirectory) <> 0 then
  +    Result := Result or AB_FMODE_DIR or AB_FPERMISSION_OWNEREXECUTE
  +  else
  +    Result := Result or AB_FMODE_FILE;
     {$WARN SYMBOL_PLATFORM ON}
   end;
   { -------------------------------------------------------------------------- }
  
positive.code:   AB_FPERMISSION_GENERIC      =
      AB_FPERMISSION_OWNERREAD or
      AB_FPERMISSION_OWNERWRITE or
      AB_FPERMISSION_OWNEREXECUTE or
      AB_FPERMISSION_GROUPREAD or
      AB_FPERMISSION_OTHERREAD;
  
  
negative.code: begin
    {$WARN SYMBOL_PLATFORM OFF}
    Result := 0;
    case (Attr and $F000) of
      AB_FMODE_FILE, AB_FMODE_FILE2: { standard file }
        Result := 0;
  
      AB_FMODE_FILELINK:
        Result := Result or faSymLink;
  
      AB_FMODE_DIR: { directory }
        Result := Result or faDirectory;
  
      AB_FMODE_FIFO,
      AB_FMODE_CHARSPECFILE,
      AB_FMODE_BLOCKSPECFILE,
      AB_FMODE_SOCKET:
        Result := Result or faSysFile;
    end;
  
    if (Attr and AB_FPERMISSION_OWNERWRITE) <> AB_FPERMISSION_OWNERWRITE then
  