From: Pádraig Brady Date: Thu, 3 Oct 2024 14:15:48 +0000 (+0100) Subject: ls: fix spurious output with -Z X-Git-Tag: v9.6~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a94a551ee031e0ff07d707f867cb08a8be83e78c;p=thirdparty%2Fcoreutils.git ls: fix spurious output with -Z * src/ls.c (gobble_file): Only output an error if there actually was an error. --- diff --git a/src/ls.c b/src/ls.c index 101ffa8182..290ce35d24 100644 --- a/src/ls.c +++ b/src/ls.c @@ -3518,7 +3518,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode, ls fail just because the file (even a command line argument) isn't on the right type of file system. I.e., a getfilecon failure isn't in the same class as a stat failure. */ - if (print_scontext + if (print_scontext && ai.scontext_err && (! (is_ENOTSUP (ai.scontext_err) || ai.scontext_err == ENODATA))) error (0, ai.scontext_err, "%s", quotef (full_name));