From 7061a01ba7eace50e99e255da134e089bc0834c1 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Fri, 20 Jul 2007 01:24:49 +0000 Subject: [PATCH] Don't exit immediately on libarchive warnings, just set the delayed return value and keep going. Approved by: re (hrs) MFC after: 7 days --- usr.bin/tar/Makefile | 2 +- usr.bin/tar/read.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile index 15b386ab901..153cd0ec9af 100644 --- a/usr.bin/tar/Makefile +++ b/usr.bin/tar/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= bsdtar -VERSION= 2.2.3 +VERSION= 2.2.5 SRCS= bsdtar.c getdate.y matching.c read.c tree.c util.c write.c WARNS?= 5 DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} diff --git a/usr.bin/tar/read.c b/usr.bin/tar/read.c index dead37a22c8..b0c5d2c8ede 100644 --- a/usr.bin/tar/read.c +++ b/usr.bin/tar/read.c @@ -129,15 +129,15 @@ read_archive(struct bsdtar *bsdtar, char mode) break; if (r < ARCHIVE_OK) bsdtar_warnc(bsdtar, 0, "%s", archive_error_string(a)); + if (r <= ARCHIVE_WARN) + bsdtar->return_value = 1; if (r == ARCHIVE_RETRY) { /* Retryable error: try again */ bsdtar_warnc(bsdtar, 0, "Retrying..."); continue; } - if (r != ARCHIVE_OK) { - bsdtar->return_value = 1; + if (r == ARCHIVE_FATAL) break; - } /* * Exclude entries that are too old.