From 435b7a22fb8d64d1c2c0d4ddca0b387f25984c1d Mon Sep 17 00:00:00 2001 From: Michael Debertol Date: Thu, 2 Sep 2021 22:42:09 +0200 Subject: [PATCH] uucore/perms: add more information to an error message This reverts part of https://github.com/uutils/coreutils/pull/2628, because (even though it got the test passing) it was the wrong bug fix. --- src/uucore/src/lib/features/perms.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/uucore/src/lib/features/perms.rs b/src/uucore/src/lib/features/perms.rs index a4a01c499..b071cedaa 100644 --- a/src/uucore/src/lib/features/perms.rs +++ b/src/uucore/src/lib/features/perms.rs @@ -358,7 +358,12 @@ impl ChownExecutor { Err(e) => { match self.verbosity.level { VerbosityLevel::Silent => (), - _ => show_error!("cannot access '{}': {}", path.display(), strip_errno(&e)), + _ => show_error!( + "cannot {} '{}': {}", + if follow { "dereference" } else { "access" }, + path.display(), + strip_errno(&e) + ), } None }