View Issue Details

IDProjectCategoryView StatusLast Update
0003626Far ManagerCopy/Movepublic2019-08-26 22:24
ReporterpepakAssigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status newResolutionopen 
Platformx64OSWindowsOS Version7
Product Version3.0 
Target VersionFixed in Version 
Summary0003626: Do not show error messages for Copy Access Rights errors
DescriptionAttached you will find two patches which handle the %subj%:

1) In the MCannotGetSecurity, MCannotSetSecurity dialogs, add a new button to never display another such message in this instance of FAR. Intended to be used when FAR is running as a non-privileged user with System.CopySecurityOptions = 27 - then some files may not allow setting access rights, but there's no point in displaying a message because the user is not privileged enough to do anything about it anyway.

2) Extend System.CopySecurityOptions with flag 0x80000000 which will always disable the error dialogs from #1, even without pressing that new button.

Patches created using git format-patch for build 3.0.5233.
TagsNo tags attached.
Build

Activities

pepak

2018-06-29 20:58

reporter  

patch.zip (2,790 bytes)

pepak

2018-08-09 18:03

reporter   bugnote:0016197

Hmm. I can't help but feel disappointed. What the hell, lesson learned - next time don't bother sending improvements to FAR, because no one cares.

DrKnS

2018-08-09 18:50

administrator   bugnote:0016198

Please calm down and consider creating pull requests on github if you want more attention to your proposals.

It's more visible to us and to others and literally infinitely times more convenient.

pepak

2019-06-20 07:06

reporter   bugnote:0016526

An updated patch to solve this ticket. Copy it to FAR source directory and run 'git apply patch.diff'. IMO, much more convenient than Github pull request.

patch.diff (2,869 bytes)
From 308b48b6a96c226d09d65e7a3b554396d6722449 Mon Sep 17 00:00:00 2001
From: pepak <pepak@pepak.net>
Date: Tue, 12 Mar 2019 17:32:06 +0100
Subject: [PATCH] Option to prevent display of file rights errors

---
 extra/Documentation/eng/TechInfo.txt | 2 ++
 far/copy.cpp                         | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/extra/Documentation/eng/TechInfo.txt b/extra/Documentation/eng/TechInfo.txt
index 14745b7f9..ed4e96ba1 100644
--- a/extra/Documentation/eng/TechInfo.txt
+++ b/extra/Documentation/eng/TechInfo.txt
@@ -552,6 +552,8 @@ the main help file, that is actual for the current Far Manager version.
                bit 4 is set to 0) or "Move" (both bits 3 and 4 are  set  to
                1) by default;
      5 - Copy dialog: remember option state for the current Far session.
+    31 - Do not display  any  error  messages  related  to  setting  access
+               rights.
    The effect of bits 0 and 1 depends on the state of bit 2:
    1. If bit 2 is set to 1 then the "Access  rights"  option  will  be  set
       according to bits 0 and 1 only in the first time the Move  dialog  is
diff --git a/far/copy.cpp b/far/copy.cpp
index b5fa8a44a..0025ad244 100644
--- a/far/copy.cpp
+++ b/far/copy.cpp
@@ -138,10 +138,12 @@ enum COPYSECURITYOPTIONS
 	CSO_COPY_SETCOPYSECURITY       = 3_bit,          // Copy: по умолчанию выставлять опцию "Copy access rights"?
 	CSO_COPY_SETINHERITSECURITY    = 3_bit | 4_bit, // Copy: по умолчанию выставлять опцию "Inherit access rights"?
 	CSO_COPY_SESSIONSECURITY       = 5_bit,          // Copy: сохранять состояние "access rights" внутри сессии?
+	CSO_NOERRORMESSAGE             = 31_bit,         // Do not display any error messages related to access rights settings
 };
 
 static int CopySecurityCopy=-1;
 static int CopySecurityMove=-1;
+static bool DefaultSkipSecurityErrors = false;
 
 static bool ZoomedState, IconicState;
 
@@ -516,6 +518,7 @@ ShellCopy::ShellCopy(panel_ptr SrcPanel,     // исходная панель (
 	string SingleSelName;
 	DWORD SingleSelAttributes = 0;
 	unsigned long long SingleSelectedFileSize = 0;
+	SkipSecurityErrors = DefaultSkipSecurityErrors;
 
 	if (SelCount==1)
 	{
@@ -995,6 +998,11 @@ ShellCopy::ShellCopy(panel_ptr SrcPanel,     // исходная панель (
 		Flags|=FCOPY_COPYPARENTSECURITY;
 
 	m_CopySecurity=Flags&FCOPY_COPYSECURITY?1:(Flags&FCOPY_LEAVESECURITY?2:0);
+	if (Global->Opt->CMOpt.CopySecurityOptions&CSO_NOERRORMESSAGE)
+	{
+		SkipSecurityErrors = true;
+		DefaultSkipSecurityErrors = true;
+	}
 
 	// в любом случае сохраняем сессионное запоминание (не для Link, т.к. для Link временное состояние - "ВСЕГДА!")
 	if (!Link)
-- 
2.21.0.windows.1

patch.diff (2,869 bytes)

cmdorexe

2019-08-06 17:10

reporter   bugnote:0016552

up

Issue History

Date Modified Username Field Change
2018-06-29 20:58 pepak New Issue
2018-06-29 20:58 pepak File Added: patch.zip
2018-08-09 18:03 pepak Note Added: 0016197
2018-08-09 18:50 DrKnS Note Added: 0016198
2019-06-20 07:06 pepak File Added: patch.diff
2019-06-20 07:06 pepak Note Added: 0016526
2019-08-06 17:10 cmdorexe Note Added: 0016552