Skip to content

Commit

Permalink
Added error message when archive extraction fails
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaT75 committed Nov 2, 2021
1 parent 86c9361 commit f27c173
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tar/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,9 @@ read_archive(struct bsdtar *bsdtar, char mode, struct archive *writer)
r = archive_read_extract2(a, entry, writer);
if (r != ARCHIVE_OK) {
if (!bsdtar->verbose)
safe_fprintf(stderr, "%s",
archive_entry_pathname(entry));
safe_fprintf(stderr, ": %s",
archive_error_string(a));
safe_fprintf(stderr, "%s", archive_entry_pathname(entry));
fprintf(stderr, ": %s: ", archive_error_string(a));

This comment has been minimized.

Copy link
@Salt-Mc

Salt-Mc Mar 31, 2024

Easy to point out now after 3 years πŸ˜†

fprintf(stderr, "%s", strerror(errno));
if (!bsdtar->verbose)
fprintf(stderr, "\n");
bsdtar->return_value = 1;
Expand Down

0 comments on commit f27c173

Please sign in to comment.