Don't exit immediately on libarchive warnings, just

set the delayed return value and keep going.

Approved by: re (hrs)
MFC after: 7 days
This commit is contained in:
Tim Kientzle 2007-07-20 01:24:49 +00:00
parent 53dcfbd18b
commit 7061a01ba7
2 changed files with 4 additions and 4 deletions

View file

@ -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}

View file

@ -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.