mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Wfx-plugins - display read-only delete confirmation only for files with NTFS attributes
This commit is contained in:
parent
56098e1312
commit
d90959dbf0
2 changed files with 5 additions and 7 deletions
|
|
@ -47,7 +47,7 @@ type
|
|||
implementation
|
||||
|
||||
uses
|
||||
DCOSUtils, uLng, WfxPlugin;
|
||||
DCOSUtils, uFileProperty, uLng, WfxPlugin;
|
||||
|
||||
constructor TWfxPluginDeleteOperation.Create(aTargetFileSource: IFileSource;
|
||||
var theFilesToDelete: TFiles);
|
||||
|
|
@ -122,9 +122,10 @@ var
|
|||
logOptions: TLogOptions;
|
||||
begin
|
||||
Result := False;
|
||||
aFileName := aFile.Path + aFile.Name;
|
||||
aFileName := aFile.FullPath;
|
||||
|
||||
if FileIsReadOnly(aFile.Attributes) then
|
||||
if (aFile.AttributesProperty.ClassType = TNtfsFileAttributesProperty) and
|
||||
(TNtfsFileAttributesProperty(aFile.AttributesProperty).IsReadOnly) then
|
||||
begin
|
||||
case FDeleteReadOnly of
|
||||
fsoogNone:
|
||||
|
|
@ -150,9 +151,6 @@ begin
|
|||
repeat
|
||||
bRetry := False;
|
||||
|
||||
//if FileIsReadOnly(aFile.Attributes) then
|
||||
// mbFileSetReadOnly(aFileName, False);
|
||||
|
||||
with FWfxPluginFileSource.WfxModule do
|
||||
if aFile.IsDirectory then // directory
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -977,7 +977,7 @@ end;
|
|||
|
||||
function TNtfsFileAttributesProperty.IsReadOnly: Boolean;
|
||||
begin
|
||||
Result := (FAttributes and FILE_ATTRIBUTE_READONLY) <> 0;
|
||||
Result := (FAttributes and (FILE_ATTRIBUTE_READONLY or FILE_ATTRIBUTE_HIDDEN or FILE_ATTRIBUTE_SYSTEM)) <> 0;
|
||||
end;
|
||||
|
||||
function TNtfsFileAttributesProperty.IsHidden: Boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue