Description
In JabRef version 5.0 the fulltext file can be deleted when trying to rename it to the almost the same name, as it already had, but with different letter case.
For example:
- Let's say we have an entry with Bibtexkey "Einstein1905a" and fulltext file "Einstein1905a.pdf".
- In the "Required Fields" tab, change the Bibtexkey to "Einstein1905A" (that is, change lower case "a" to upper case "A").
- In the "General" tab, "File" field, right click the file and choose "Rename file to defined pattern" in the menu shown after that.
- A message "File exists" will be shown, giving options "Overwrite" and "Cancel".
- Choose "Overwrite".
- Look for the file "Einstein1905a.pdf" or "Einstein1905A.pdf" in the directory where it is supposed to be, or try to open it from JabRef.
The expected behaviour is that after those steps, file with the new name ("Einstein1905A.pdf") would exist, or, at least, file with the old name ("Einstein1905a.pdf") would exist and an error message about failed renaming would be shown (perhaps suggesting a workaround - using an intermediate step of renaming to a name with added or removed letter).
But the actual behaviour is that after those steps neither file "Einstein1905a.pdf" nor "Einstein1905A.pdf" exists, it ends up being deleted.
If I understand it correctly, the message "File exists" is shown for compatibility (some operating systems allow the file names to differ only by letter case, some do not). That looks reasonable, but then there should probably be a check if the file causing this "naming conflict" is the same file being renamed.