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.