]> pd.if.org Git - zpackage/blobdiff - zpm-syncfs.c
improve check existing logic
[zpackage] / 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);
                }