From 41a2d01453e0245f8b391b082ab412e3fb0299c6 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Thu, 10 Oct 2024 23:11:43 -0700 Subject: [PATCH] Fix error message printing (#2368) We always print the error message with or without -v, but for some reason, we were omitting the path being processed. Simplify so that we always print the full error including context. --- tar/write.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tar/write.c b/tar/write.c index 43cd70233..22f21ff69 100644 --- a/tar/write.c +++ b/tar/write.c @@ -984,12 +984,11 @@ write_entry(struct bsdtar *bsdtar, struct archive *a, safe_fprintf(stderr, "a "); list_item_verbose(bsdtar, stderr, entry); lafe_warnc(0, ": %s", archive_error_string(a)); - } else if (bsdtar->verbose > 0) { + } else { lafe_warnc(0, "%s: %s", archive_entry_pathname(entry), archive_error_string(a)); - } else - fprintf(stderr, ": %s", archive_error_string(a)); + } } if (e == ARCHIVE_FATAL) -- 2.47.2