summaryrefslogtreecommitdiffstats
path: root/misc-utils/rename.c
diff options
context:
space:
mode:
authorG.raud Meyer2018-03-27 15:22:58 +0200
committerG.raud Meyer2018-03-27 15:22:58 +0200
commit6277e2310e819cf0facc2a6519b420362121b278 (patch)
tree17bb1e28e374e2fab26c3f41cedda5f15e2ff562 /misc-utils/rename.c
parentrename: consolidate printing the symlink in addition to its target (diff)
downloadkernel-qcow2-util-linux-6277e2310e819cf0facc2a6519b420362121b278.tar.gz
kernel-qcow2-util-linux-6277e2310e819cf0facc2a6519b420362121b278.tar.xz
kernel-qcow2-util-linux-6277e2310e819cf0facc2a6519b420362121b278.zip
rename: when --no-overwrite skip verbosily only when --verbose
Diffstat (limited to 'misc-utils/rename.c')
-rw-r--r--misc-utils/rename.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc-utils/rename.c b/misc-utils/rename.c
index a820fb63b..1d280add3 100644
--- a/misc-utils/rename.c
+++ b/misc-utils/rename.c
@@ -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) {