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

Found an issue when renaming overwrites existing file #75

Open
assarbad opened this issue Sep 23, 2023 · 2 comments
Open

Found an issue when renaming overwrites existing file #75

assarbad opened this issue Sep 23, 2023 · 2 comments

Comments

@assarbad
Copy link
Contributor

I tried to rename a number of .epub files. Seven to be precise.

In the course of renaming, I changed one existing file to another name and gave a new file that previous name. So essentially I had something like (condensed to two files):

ABC -> ABC1
BCD -> ABC

It complained that the renaming of BCD to ABC would overwrite existing files.

There were two issues with that:

  1. it didn't include all renames performed
  2. it wrongly concluded that the renaming of BCD to ABC would overwrite the file which -- in the same renaming session -- had been reassigned the name ABC1

Here's the actual output:

$ renamer *.epub

The following replacements overwrite existing files:
Циолковский Константин. На Луне - royallib.com.epub -> На Луне (Константин Циолковский).epub

Execute these renames?: Yes
@mtimkovich
Copy link
Collaborator

mtimkovich commented Sep 25, 2023

Thanks for the report! That doesn't surprise me because the existing files check only checks the state of things before the renames.

Edit: Re your first bullet: that's an easy fix, I need to have it print all renames in the case that there are conflicts.

@mtimkovich
Copy link
Collaborator

This also causes the problem where --undo doesn't undo the affected files because it doesn't realize the conflict.

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

2 participants