darktable-org / darktable-org/darktable

Import issue when Canon Image filenames reached beyond `YYYY_MM_DD_9999.cr3`

Open
#19,591 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

no-issue-activity scope: DAM
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

Hi!

My Canon camera reached past the 9999 picture in my last trip and I didn't realize. Until then the file naming was of YYYY_MM_DD_XXXX.cr3 with XXXX ranging being 0001-9999. After that, it changed the naming to:

  • YYYY_MM_DD_9999_1.cr3
  • YYYY_MM_DD_9999_2.cr3
  • ...
  • YYYY_MM_DD_9999_9.cr3
  • YYYY_MM_DD_9999_10.cr3
  • YYYY_MM_DD_9999_11.cr3
  • ...
  • YYYY_MM_DD_9999_99.cr3
  • YYYY_MM_DD_9999_100.cr3
  • YYYY_MM_DD_9999_101.cr3
  • ...

and this seems to have completely messed Darktable's image import with groupings. In the Lightable section, I see repeated images with the same name YYYY_MM_DD_9999.CR3 that can go from around a dozen to hundreds of them (check screenshots). It seems this repeated image group is appearing once for every date/day.

There's to questions that I have now:

  • Is this expected behaviour? Is there a way to fix this during the import step that I missed?
  • What would be the best course of action for me. I had already started rating and discarding hundreds of pics before I reached this 9999+ issue.

If there is any extra info you need please let me know.

Steps to reproduce
  1. Import images with filename of type YYYY_MM_DD_XXXX.cr3 with XXXX in the range 0001-9999
  2. See that all is good.
  3. Import images with filename of type YYYY_MM_DD_9999_Y.cr3 with Y being 1/2/3/.../9/10/11/.../99/100/101/...
  4. Lighttable will show repeated picture groups that are not correct.
Expected behavior

I understand the naming scheme past 9999 by Canon really sucks and I would understand sorting issues, but Darktable should not create these incorrect groups of pictures duplicates of pictures as can be seen in the screenshots (edit for clarity).

Logfile | Screenshot | Screencast
Image Image Image
Commit

No response

Where did you obtain darktable from?

darktable.org / GitHub release

darktable version

5.2.1

What OS are you using?

Windows

What is the version of your OS?

Windows 10 Home

Describe your system

No response

Are you using OpenCL GPU in darktable?

Yes

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

Start by reproducing the import with Canon-style names ending in YYYY_MM_DD_9999_Y.cr3 on darktable 5.2.1, using the issue's Windows setup and expected duplicate/grouping behavior as the baseline. Trace the import and grouping path until the repeated YYYY_MM_DD_9999.CR3 entries are accounted for, then verify that the affected files appear once with correct grouping.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.