From: Nathan Wagner Date: Wed, 17 Oct 2018 10:16:52 +0000 (+0000) Subject: improve check existing logic X-Git-Tag: v0.2.16~83 X-Git-Url: https://pd.if.org/git/?p=zpackage;a=commitdiff_plain;h=7b9350d9ec18a9ab5bbcf92a6523b856839f8f5b improve check existing logic --- diff --git a/zpm-syncfs.c b/zpm-syncfs.c index 9985188..935e715 100644 --- a/zpm-syncfs.c +++ b/zpm-syncfs.c @@ -695,7 +695,7 @@ static int install_files(void *f, int ncols, char **vals, char **cols) { return conf->errabort; } - if (conf->verbose) { + if (conf->verbose && !conf->dryrun) { fprintf(stderr, "%s '%c' %s\n", nitem.opstr, nitem.ftype, nitem.dest); } @@ -1104,7 +1104,7 @@ int main(int ac, char **av){ /* no point in running it if we're just going to * overwrite everything */ - if ((conf.overwrite == 0 || conf.absorb == 0) && !conf.dryrun) { + if (!conf.overwrite && !conf.absorb && !conf.dryrun) { runstage(&conf, "new", check_existing); }