From 9a61c64a01cbe0d297509d222cef22a8dbc28214 Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Wed, 12 Dec 2018 22:28:09 +0000 Subject: [PATCH] fix zpm-add db constraints --- zpm-add.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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') { -- 2.40.0