]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
rename: when --no-overwrite skip verbosily only when --verbose
authorG.raud Meyer <graud@gmx.com>
Tue, 27 Mar 2018 13:22:58 +0000 (15:22 +0200)
committerG.raud Meyer <graud@gmx.com>
Tue, 27 Mar 2018 13:22:58 +0000 (15:22 +0200)
misc-utils/rename.c

index a820fb63b640cd4328696b6edcb5a029e0a455dc..1d280add37809b8f0f2f417286e2c9c91c800237 100644 (file)
@@ -113,7 +113,8 @@ static int do_file(char *from, char *to, char *s, int verbose, int noact, int no
        if (string_replace(from, to, file, s, &newname))
                return 0;
        if (nooverwrite && access(newname, F_OK) == 0) {
-               printf(_("Skipping existing file: `%s'\n"), newname);
+               if (verbose)
+                       printf(_("Skipping existing file: `%s'\n"), newname);
                ret = 0;
        }
        else if (!noact && rename(s, newname) != 0) {