FIX: WinToUnixFileAttr function

(cherry picked from commit bbf030a6aa)
This commit is contained in:
Alexander Koblov 2024-12-29 14:04:56 +03:00
commit ab816613d1

View file

@ -188,13 +188,14 @@ function WinToUnixFileAttr(Attr: TFileAttrs): TFileAttrs;
begin
Result := S_IRUSR or S_IRGRP or S_IROTH;
if (Attr and faReadOnly) = 0 then
Result := Result or S_IWUSR;
if (Attr and faDirectory) <> 0 then
Result := Result or S_IFDIR or S_IXUGO
else
Result := Result or S_IFDIR or S_IXUGO or S_IWUSR
else begin
Result := Result or S_IFREG;
if (Attr and faReadOnly) = 0 then
Result := Result or S_IWUSR;
end;
end;
function UnixToWinFileAttr(Attr: TFileAttrs): TFileAttrs;