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

Fix XMP files updating needlessly #18144

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

wpferguson
Copy link
Member

src/common/image.c - don't force XMP writes

Fixes #18138

@jenshannoschwalm
Copy link
Collaborator

On first-sight this looked wrong to me :-) But indeed this just enforces the g_compute_checksum_for_data check in dt_exif_xmp_write to be taken into account so indeed it's right :-)

I think the force_write flag is somewhat misleading as we now always call dt_exif_xmp_write with FALSE. Wouldn't it be better to simplify code and api and remove that flag?

@wpferguson wpferguson added the bugfix pull request fixing a bug label Jan 4, 2025
@wpferguson wpferguson added this to the 5.0.1 milestone Jan 4, 2025
@wpferguson
Copy link
Member Author

Force write also forces all the darktable tags to be written to the XMP file, which is why I changed it to TRUE in image.c. What I didn't know/realize was that it would cause the XMP to be written every time the image was closed from darkroom.

For 5.0.1 I think we should just revert my earlier change.

For 5.2 we can look at the whole function and decide what needs to happen , i.e. should all darktable tags be preset in the XMP and/or how do we do it if we decide they don't? IMO if we are using the XMP files as the database backup of last resort, then all of the darktable tags should be present. If some of the darktable tags don't need to be present in the XMP, then why are we using them in the first place.

Copy link
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TurboGit TurboGit merged commit 1108e69 into darktable-org:master Jan 5, 2025
6 checks passed
@TurboGit
Copy link
Member

TurboGit commented Jan 5, 2025

Merged in master and 5.0.x branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix pull request fixing a bug release notes: pending
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XMP files updated despite no change
3 participants