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.
This commit is contained in:
Michael Debertol 2021-09-02 22:42:09 +02:00
parent a7f6b4420a
commit 435b7a22fb

View file

@ -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
}