mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
tar: make error reporting more robust and use correct errno
Apply upstream pull request 2101. (cherry picked from commit d68c68693e110353f70b5c04f8de416cf5766eca)
This commit is contained in:
parent
41d9d301fb
commit
bade279b81
1 changed files with 3 additions and 2 deletions
|
|
@ -372,8 +372,9 @@ read_archive(struct bsdtar *bsdtar, char mode, struct archive *writer)
|
|||
if (r != ARCHIVE_OK) {
|
||||
if (!bsdtar->verbose)
|
||||
safe_fprintf(stderr, "%s", archive_entry_pathname(entry));
|
||||
fprintf(stderr, ": %s: ", archive_error_string(a));
|
||||
fprintf(stderr, "%s", strerror(errno));
|
||||
safe_fprintf(stderr, ": %s: %s",
|
||||
archive_error_string(a),
|
||||
strerror(archive_errno(a)));
|
||||
if (!bsdtar->verbose)
|
||||
fprintf(stderr, "\n");
|
||||
bsdtar->return_value = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue