P: LrC reads metadata for a DNG from an associated sidecar
When LR imports a DNG, if there is a .xmp sidecar of the same file name, LR will incorrectly read metadata from the sidecar, but only if the date-modified of the .xmp file is newer than that of the .dng. Similar behavior occurs with Metadata > Read Metadata From File.
LR should never read metadata for a DNG from a .xmp sidecar (just as it doesn't for JPEG, TIFF, and other non-raw formats). And note that for sidecars of raw files, the sidecar is always read regardless of whether its date-modified is newer or older than the associated raw file.
See this thread for the original report of the problem.
Tested on LR 11.5 / Mac OS 12.4. Steps to reproduce:
1. Disable the option Catalog Settings > Metadata > Automatically Write Changes Into XMP.
2. Download a.xmp and a.dng into the same folder.
https://www.dropbox.com/s/n9kpqeddqtff83p/dng-xmp.2022.09.16.zip?dl=0
3. In Mac Terminal, do the command "touch a.dng"; on Windows, do "copy a.dng + nul a.dng". These commands will set the date-modified of a.dng to "now", newer than a.xmp.
4. Import a.dng with the Add option.
5. Select a.dng and observe that the Metadata panel's Sidecar Files field is blank.
6. Observe that a.dng is black & white with no label or rating (correct).
7. Remove a.dng from the catalog.
8. In Mac Terminal, do the command "touch a.xmp"; on Windows, do "copy a.xmp + nul a.xmp". These commands will set the date-modified of a.xmp to "now", newer than a.dng.
9. Import a.dng with the Add option.
10. Select a.dng and observe that the Metadata panel's Sidecar Files field is blank.
11. Observe that a.dng is color, not black & white, and it has a red label and rating = 2, indicating that LR has read metadata from a.xmp (incorrect).
