From 2cc5e25fb107fe0ff77c95a983474497b76ac9f8 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 9 Mar 2025 21:27:05 -0500 Subject: [PATCH] Fix xattr error test. --- toys/posix/tar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/posix/tar.c b/toys/posix/tar.c index abc884b7..06482c16 100644 --- a/toys/posix/tar.c +++ b/toys/posix/tar.c @@ -406,7 +406,7 @@ static int add_to_tar(struct dirtree *node) strcpy(buf+start+sz-1, "\n"); write_prefix_block(buf, start+sz, 'x'); } else if (errno==ENODATA || errno==ENOTSUP) len = 0; - if (len) perror_msg("getfilecon %s", name); + if (len<0) perror_msg("getfilecon %s", name); free(buf); break; -- 2.39.5