Skip to content

fix: backfill missing XMP sidecars and avoid filename collisions - #1569

Open
TomasVSantos wants to merge 2 commits into
CyberTimon:mainfrom
TomasVSantos:tomas/fix-xmp-backfill-collisions
Open

fix: backfill missing XMP sidecars and avoid filename collisions#1569
TomasVSantos wants to merge 2 commits into
CyberTimon:mainfrom
TomasVSantos:tomas/fix-xmp-backfill-collisions

Conversation

@TomasVSantos

@TomasVSantos TomasVSantos commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #1556.

When “Create XMP if missing” was enabled after images had already been rated or edited, missing XMP sidecars were not generated. This change backfills missing XMP files from existing .rrdata sidecars when the setting is enabled.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Performance improvement
  • Code refactoring
  • Documentation update
  • UI/UX improvement
  • Build/CI or Dependency update

Changes Made

  • Added a Rust command to recursively find .rrdata files and create missing XMP sidecars.
  • Registered the command with Tauri and invoked it when enabling the setting.
  • Added success and error toast notifications with translations.
  • Changed XMP paths to include the source file extension, preventing RAW and JPEG files with the same filename from sharing one XMP file.
  • Existing legacy XMP files are not migrated.

Screenshots/Videos

image

Testing

  • These changes were tested locally by a human and confirmed to work.
  • I haven't added any automated tests to the code because the codebase currently lacks a test suite.

Test Configuration:

  • OS: macOS 26.3.1
  • Hardware: Apple Silicon (arm64)

Additional verification:

  • cargo check passes.
  • cargo test passes; the repository currently contains no automated tests.
  • Prettier and git diff --check pass.

Checklist

  • My code follows the project's code style
  • I haven't added unnecessary AI-generated code comments
  • My changes generate no new warnings or errors

Additional Notes

The new sidecar naming prevents collisions:

  • IMG_2280.DNG.xmp
  • IMG_2280.jpg.xmp

Existing IMG_2280.xmp files are intentionally not migrated.

The repository currently has unrelated existing TypeScript and i18n validation errors.

AI Disclaimer:

  • This PR is created by an AI agent
  • This PR is mostly AI-generated but edited/merged together by a human
  • This PR was handwritten with AI assistance (spell check, logic suggestions, error resolving)
  • This PR contains only blood, sweat, and coffee (AI-free)

@TomasVSantos
TomasVSantos force-pushed the tomas/fix-xmp-backfill-collisions branch from 39e6310 to 1ea1916 Compare August 24, 2026 20:29
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

Successfully merging this pull request may close these issues.

BUG: XMP files are not generated after "Create Missing XMP Files" is turned on after files have been rated

1 participant