pkgtools

morpheus pkg tools
git clone git://git.2f30.org/pkgtools
Log | Files | Refs | README | LICENSE

commit e61bda0fa4d9e3d0c5a23d0833f4ff7e93af0534
parent 129ec54aaba3baa355ebf02a2f10248ca0eb05d7
Author: sin <sin@2f30.org>
Date:   Tue, 17 Jun 2014 10:43:40 +0100

Prepend path for libarchive errors

Diffstat:
Mdb.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/db.c b/db.c @@ -402,7 +402,8 @@ dbpkginstall(struct db *db, const char *name) if (r == ARCHIVE_EOF) break; if (r != ARCHIVE_OK) { - fprintf(stderr, "%s\n", archive_error_string(ar)); + fprintf(stderr, "%s: %s\n", archive_entry_pathname(entry), + archive_error_string(ar)); r = chdir(cwd); if (r < 0) fprintf(stderr, "chdir %s: %s\n", cwd, strerror(errno)); @@ -412,7 +413,8 @@ dbpkginstall(struct db *db, const char *name) ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_UNLINK | ARCHIVE_EXTRACT_SECURE_NODOTDOT; if (archive_read_extract(ar, entry, flags) != ARCHIVE_OK) - fprintf(stderr, "%s\n", archive_error_string(ar)); + fprintf(stderr, "%s: %s\n", archive_entry_pathname(entry), + archive_error_string(ar)); } archive_read_free(ar);