From: Tim Kientzle Date: Fri, 11 Oct 2024 06:11:43 +0000 (-0700) Subject: Fix error message printing (#2368) X-Git-Tag: v3.8.0~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41a2d01453e0245f8b391b082ab412e3fb0299c6;p=thirdparty%2Flibarchive.git 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. --- 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)