]> git.ipfire.org Git - thirdparty/util-linux.git/commit
Fix `rename -a ''`.
authorPhilip Hazelden <philip.hazelden@gmail.com>
Sun, 3 Jul 2022 17:54:43 +0000 (18:54 +0100)
committerPhilip Hazelden <philip.hazelden@gmail.com>
Sun, 3 Jul 2022 22:27:17 +0000 (23:27 +0100)
commit2285629d7d4564773b106fa1fa29a3e34cbed3ea
tree6eba70e0e5427349714ce5e46d33e429292299f4
parent8a6c0e598937aa26ab061214a08374a708249306
Fix `rename -a ''`.

It previously entered an infinite loop. Now it inserts the `to` string
between every character of `from`, including at the beginning and end.

    rename -a '' _ 123.txt # renames to _1_2_3_._t_x_t_
misc-utils/rename.c
tests/expected/rename/basic
tests/ts/rename/basic