From 7b9350d9ec18a9ab5bbcf92a6523b856839f8f5b Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Wed, 17 Oct 2018 10:16:52 +0000 Subject: [PATCH] improve check existing logic --- zpm-syncfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.40.0