From 161b2956bb65106b6752069befd9572ef6d4c57c Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Fri, 5 Jan 2007 16:20:21 +0000 Subject: [PATCH] If append_archive fails while writing an archive header, output the error message from the archive being written (not the message from the archive being read, where no error has occurred). MFC after: 3 days --- usr.bin/tar/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c index 7a0ae6c27449..f3827502360b 100644 --- a/usr.bin/tar/write.c +++ b/usr.bin/tar/write.c @@ -488,7 +488,7 @@ append_archive(struct bsdtar *bsdtar, struct archive *a, const char *filename) /* XXX handle/report errors XXX */ if (archive_write_header(a, in_entry)) { bsdtar_warnc(bsdtar, 0, "%s", - archive_error_string(ina)); + archive_error_string(a)); bsdtar->return_value = 1; return (-1); }