]> pd.if.org Git - zpackage/commitdiff
improve check existing logic
authorNathan Wagner <nw@hydaspes.if.org>
Wed, 17 Oct 2018 10:16:52 +0000 (10:16 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Sat, 3 Nov 2018 12:39:52 +0000 (12:39 +0000)
zpm-syncfs.c

index 99851880530b0ac0e130873010e9b951cb75f15a..935e71509f2591ae20cc3a9801c22548c0a53ae1 100644 (file)
@@ -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);
                }