diff options
author | kientzle <kientzle@FreeBSD.org> | 2008-09-04 05:20:46 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2008-09-04 05:20:46 +0000 |
commit | 4f411074474a45c8d1b5435cc8262452a01219b8 (patch) | |
tree | 18b034ad60656898636210ff6f3d1c4e774d55fa /usr.bin/cpio/cpio.c | |
parent | e150d8eb07057f30998d23ec1de64f6c982bae00 (diff) | |
download | FreeBSD-src-4f411074474a45c8d1b5435cc8262452a01219b8.zip FreeBSD-src-4f411074474a45c8d1b5435cc8262452a01219b8.tar.gz |
Don't destroy the archive until after you finish pulling useful
information out of it. As reported by Giorgos Keramidas.
Diffstat (limited to 'usr.bin/cpio/cpio.c')
-rw-r--r-- | usr.bin/cpio/cpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/cpio/cpio.c b/usr.bin/cpio/cpio.c index 522d835..a05c0e6 100644 --- a/usr.bin/cpio/cpio.c +++ b/usr.bin/cpio/cpio.c @@ -863,7 +863,6 @@ mode_pass(struct cpio *cpio, const char *destdir) r = archive_write_close(cpio->archive); if (r != ARCHIVE_OK) cpio_errc(1, 0, archive_error_string(cpio->archive)); - archive_write_finish(cpio->archive); if (!cpio->quiet) { blocks = (archive_position_uncompressed(cpio->archive) + 511) @@ -872,6 +871,7 @@ mode_pass(struct cpio *cpio, const char *destdir) blocks == 1 ? "block" : "blocks"); } + archive_write_finish(cpio->archive); } /* |