diff options
author | G.raud Meyer | 2018-03-29 12:58:44 +0200 |
---|---|---|
committer | G.raud Meyer | 2018-03-29 20:35:30 +0200 |
commit | 0849ff36605588a7ab7892ab2aae59d73290e225 (patch) | |
tree | 13ae5e32a1fa9c4c4f8a6f5ec1879e260ef737a0 /misc-utils/rename.c | |
parent | rename: when --no-overwrite skip verbosily only when --verbose (diff) | |
download | kernel-qcow2-util-linux-0849ff36605588a7ab7892ab2aae59d73290e225.tar.gz kernel-qcow2-util-linux-0849ff36605588a7ab7892ab2aae59d73290e225.tar.xz kernel-qcow2-util-linux-0849ff36605588a7ab7892ab2aae59d73290e225.zip |
rename: prevent --no-act from setting --no-overwrite
This fixes a bug introduced by commit fabb90676 ("Added --no-override
option to rename.", 2017-05-27) where the fallthrough meant to let
--no-act set --verbose was changed to set --no-override (the previous
code was too smart).
Do not let --no-act set --verbose anymore but update the manual to
recommend adding option --verbose. This is to be able to make --no-act
detect only non existing file arguments (in a future commit).
Diffstat (limited to 'misc-utils/rename.c')
-rw-r--r-- | misc-utils/rename.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/misc-utils/rename.c b/misc-utils/rename.c index 1d280add3..147e54fe9 100644 --- a/misc-utils/rename.c +++ b/misc-utils/rename.c @@ -174,13 +174,13 @@ int main(int argc, char **argv) switch (c) { case 'n': noact = 1; - /* fallthrough */ - case 'o': - nooverwrite = 1; - break; + break; case 'v': verbose = 1; break; + case 'o': + nooverwrite = 1; + break; case 's': do_rename = do_symlink; break; |