Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't overwrite files. #38

Open
jtagcat opened this issue Jul 27, 2021 · 2 comments
Open

Don't overwrite files. #38

jtagcat opened this issue Jul 27, 2021 · 2 comments

Comments

@jtagcat
Copy link
Contributor

jtagcat commented Jul 27, 2021

Input:

o1_foo.png
o1_bar.png
o1_baz.png
o2_baz.png

ls | wc -l # 4
vimv transform:

foo.png
bar.png
baz.png
bar.png

result:

foo.png
bar.png
baz.png

Either fail, or present the conflicted files (with possibly the original name as well, bonus points for checksum) only the second time.

@uunnxx
Copy link

uunnxx commented Sep 5, 2022

Yes, we need something to prevent accidentally deleting conflicted (same name) files.

@opello
Copy link

opello commented Oct 29, 2022

This also manifests when renaming a list of files that happen to share a running number. For example, from an empty test directory:

echo 01 > 01.txt
echo 02 > 02.txt
echo 03 > 03.txt

Run vimv and use Ctrl-a on each line to change 01 to 02, 02 to 03, and 03 to 04. The result will be a single file remaining in the directory called 04.txt that contains 01 because the operations were performed in order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants