Renaming a file to the name of a deleted file makes Lightroom lose the file
Lightroom Classic 11.2 on MacOS Catalina 10.15.7. This bug has been occurring for at least the past several releases.
The following bug in Lightroom's file information caching has bit me many times.
Steps to reproduce:
1. Import a file into Lightroom, let's say "something.tif".
2. Optionally, do some editing in Lightroom, such as cropping. I follow these steps when I have a scan with borders I want to remove.
2. Right-click on "something.tif" to Edit in Adobe Photoshop 2022, and select Edit a Copy with Lightroom Adjustments.
3. Save the file in Photoshop, creating "something-Edit.tif", and close it in Photoshop.
4. In Lightroom, right-click on the original file "something.tif" and select "Remove Photo", then "Delete from Disk". Or mark it with "x" and delete with Command-Delete.
5. In Lightroom, edit the File Name of "something-Edit.tif" to "something.tif", giving the edited file the name previously used by the now-deleted unedited file.
6. In the Library module, Lightroom will soon display a badge on the thumbnail for "something.tif" saying that it can't find the file.
7. If you click on the badge to locate the file, browse to it and select "something.tif" right where it's supposed to be, Lightroom will reject it saying that file is already in use by another file, even though it isn't.
Expected behavior:
Lightroom correctly tracks which file is which.
Observed behavior:
Lightroom confuses two files that have had the same name, even though all operations on them were performed in Lightroom.
Quitting and re-starting Lightroom clears the error and Lightroom is able to find the new "something.tif" normally.