darktable-org / darktable-org/darktable

Importing files ending with '_1.jpg' creates unwanted duplicate '_01.jpg.xmp' sidecar (Regression in 5.6.0)

Open
#21,767 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
13.1k
Forks
1.4k
Avg merge
22h 14m
Merged PRs (30d)
198

Description

Is there an existing issue for this?
  • I checked and did not find my issue in the already reported ones
Describe the bug

When importing files generated by a mobile phone where one file is named IMG_20260328_113830.jpg and another is named IMG_20260328_113830_1.jpg, darktable incorrectly generates an additional sidecar file named IMG_20260328_113830_01.jpg.xmp.

This leads darktable to display a non-existent duplicate image in the lighttable. This behavior is a regression, as it did not occur in previous versions of darktable.

Darktable creates three XMP files:

  • IMG_20260328_113830.jpg.xmp
  • IMG_20260328_113830_1.jpg.xmp
  • IMG_20260328_113830_01.jpg.xmp (incorrect file generated automatically)

In the lighttable, a duplicate entry appears that was not created by the user. This happens consistently with any files ending in _1.jpg.

Version

darktable 5.6.0

Operating System

[Escriu aquí el teu sistema operatiu: p. ex., Ubuntu 24.04 / Windows 11 / macOS]

Steps to reproduce
  1. Place two images with the following naming structure in the same folder:
    • IMG_20260328_113830.jpg
    • IMG_20260328_113830_1.jpg
  2. Import the folder/files into darktable.
  3. Check the file system and darktable lighttable.
Expected behavior

Darktable should import both files as two distinct images, creating only: - IMG_20260328_113830.jpg.xmp - IMG_20260328_113830_1.jpg.xmp

Logfile | Screenshot | Screencast

No response

Commit

No response

Where did you obtain darktable from?

darktable.org / GitHub release

darktable version

darktable 5.6.0

What OS are you using?

Windows

What is the version of your OS?

Windows 11

Describe your system

No response

Are you using OpenCL GPU in darktable?

I dont know

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the regression in darktable 5.6.0 with the two specified filenames on Windows, then trace the import and XMP sidecar handling that creates the _01.jpg.xmp file. Confirm the fix by importing both images and verifying that only the two expected sidecars are created and no duplicate appears in the lighttable.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.