]> pd.if.org Git - zpackage/commitdiff
print reason for output error on extract
authorNathan Wagner <nw@hydaspes.if.org>
Thu, 25 Oct 2018 13:46:59 +0000 (13:46 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Sat, 3 Nov 2018 12:39:52 +0000 (12:39 +0000)
lib/zpm.c

index 87ffbbb3ebde53cf464a48fe5a9972883b8a1203..9bd973246b9f0f01e2594e211e9d8bc1af9e90d8 100644 (file)
--- a/lib/zpm.c
+++ b/lib/zpm.c
@@ -512,7 +512,8 @@ int zpm_extract(struct zpm *pkg, char *hash, char *path, int mode) {
                out = stdout;
        }
        if (!out) {
-               fprintf(stderr, "can't open output file %s\n", path);
+               fprintf(stderr, "can't open output file %s: %s\n", path,
+                               strerror(errno));
                sqlite3_finalize(ifile);
                sqlite3_close(db);
                return 0;