mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Wfx-plugins - read-only check
This commit is contained in:
parent
d90959dbf0
commit
0fa82eceb8
3 changed files with 19 additions and 3 deletions
|
|
@ -82,6 +82,8 @@ const
|
|||
S_IRWXU = S_IRUSR or S_IWUSR or S_IXUSR;
|
||||
S_IRWXG = S_IRGRP or S_IWGRP or S_IXGRP;
|
||||
S_IRWXO = S_IROTH or S_IWOTH or S_IXOTH;
|
||||
S_IRUGO = S_IRUSR or S_IRGRP or S_IROTH;
|
||||
S_IWUGO = S_IWUSR or S_IWGRP or S_IWOTH;
|
||||
S_IXUGO = S_IXUSR or S_IXGRP or S_IXOTH;
|
||||
|
||||
{ POSIX setuid(), setgid(), and sticky bit }
|
||||
|
|
|
|||
|
|
@ -124,8 +124,7 @@ begin
|
|||
Result := False;
|
||||
aFileName := aFile.FullPath;
|
||||
|
||||
if (aFile.AttributesProperty.ClassType = TNtfsFileAttributesProperty) and
|
||||
(TNtfsFileAttributesProperty(aFile.AttributesProperty).IsReadOnly) then
|
||||
if aFile.AttributesProperty.IsReadOnly then
|
||||
begin
|
||||
case FDeleteReadOnly of
|
||||
fsoogNone:
|
||||
|
|
|
|||
|
|
@ -256,6 +256,8 @@ type
|
|||
// Is it a symbolic link.
|
||||
function IsLink: Boolean; virtual;
|
||||
|
||||
function IsReadOnly: Boolean; virtual;
|
||||
|
||||
// Retrieves raw attributes.
|
||||
function GetAttributes: TFileAttrs; virtual;
|
||||
|
||||
|
|
@ -283,7 +285,8 @@ type
|
|||
// Is it a symbolic link.
|
||||
function IsLink: Boolean; override;
|
||||
|
||||
function IsReadOnly: Boolean;
|
||||
function IsReadOnly: Boolean; override;
|
||||
|
||||
function IsHidden: Boolean;
|
||||
|
||||
class function GetDescription: String; override;
|
||||
|
|
@ -306,6 +309,8 @@ type
|
|||
// Is it a symbolic link.
|
||||
function IsLink: Boolean; override;
|
||||
|
||||
function IsReadOnly: Boolean; override;
|
||||
|
||||
function IsOwnerRead: Boolean;
|
||||
function IsOwnerWrite: Boolean;
|
||||
function IsOwnerExecute: Boolean;
|
||||
|
|
@ -944,6 +949,11 @@ begin
|
|||
Result := fpS_ISLNK(FAttributes);
|
||||
end;
|
||||
|
||||
function TFileAttributesProperty.IsReadOnly: Boolean;
|
||||
begin
|
||||
Result:= False;
|
||||
end;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function TNtfsFileAttributesProperty.Clone: TNtfsFileAttributesProperty;
|
||||
|
|
@ -1018,6 +1028,11 @@ begin
|
|||
Result:= ((FAttributes and S_IFMT) = S_IFLNK);
|
||||
end;
|
||||
|
||||
function TUnixFileAttributesProperty.IsReadOnly: Boolean;
|
||||
begin
|
||||
Result:= (((FAttributes and S_IRUGO) <> 0) and ((FAttributes and S_IWUGO) = 0));
|
||||
end;
|
||||
|
||||
function TUnixFileAttributesProperty.IsOwnerRead: Boolean;
|
||||
begin
|
||||
Result:= False;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue