From: Nathan Wagner Date: Wed, 12 Dec 2018 22:28:09 +0000 (+0000) Subject: fix zpm-add db constraints X-Git-Tag: v0.5.0~47 X-Git-Url: https://pd.if.org/git/?p=zpackage;a=commitdiff_plain;h=9a61c64a01cbe0d297509d222cef22a8dbc28214 fix zpm-add db constraints --- diff --git a/zpm-add.c b/zpm-add.c index 82a92fa..d80ac08 100644 --- a/zpm-add.c +++ b/zpm-add.c @@ -298,7 +298,9 @@ int add_file(struct zpm *zpm, struct zpm_file *file, struct opts *opt) { opt->package, opt->version, opt->release, file->path, file->mode, (int)file->mtime, file->owner, file->group, file->type, - file->hash, file->configuration, file->target + file->type == 'r' ? file->hash : NULL, + file->configuration, + file->type == 'l' ? file->target : NULL ); if (zpm->error) { @@ -310,7 +312,7 @@ int add_file(struct zpm *zpm, struct zpm_file *file, struct opts *opt) { } else if (opt->verbose > 0) { printf("%s\n", file->path); - + fflush(stdout); } if (opt->recursive && file->type == 'd') {