darktable-org / darktable-org/darktable
Copy & Import: Lower-case bug $(FILE_EXTENSION,,)
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 JPG and RAF files of the same photograph, Darktable fails to set lowercase for the file extension of the file imported in second place.
Steps to reproduce
- Click copy & import
- With "file naming pattern" set to:
$(JOBCODE)-$(EXIF_YEAR)$(EXIF_MONTH)$(EXIF_DAY)-$(FILE_NAME:4:4).$(FILE_EXTENSION,,) - Select, for instance, DSCF1001.JPG; DSCF1001.RAF.
- Imported filenames will look like: Lisbon-20260131-1001.jpg; Lisbon-20260131-1001.RAF. The Lisbon-20260131-1001.RAF should be Lisbon-20260131-1001.raf.
Note: If I import first all JPG and then all RAF, the intended lowercase pattern is fully reflected in the imported filenames.
I also tried
$(JOBCODE)-$(EXIF_YEAR)$(EXIF_MONTH)$(EXIF_DAY)-$(SEQUENCE).$(FILE_EXTENSION,,),
with the same uppercase error/bug: The Lisbon-20260131-0001.RAF instead of Lisbon-20260131-0001.raf.
Therefore, it seems to me that the bug is related with the "repetition" in the file number.
Expected behavior
Lower case in second-imported file of the same image (JPG+RAF). E.g. Lisbon-20260131-1001.RAF should be Lisbon-20260131-1001.raf.
Logfile | Screenshot | Screencast
No response
Commit
No response
Where did you obtain darktable from?
distro packaging
darktable version
5.5.0git139.4f4d6644-1+13622.1 and this is still true in 5.7.0git188.a8908e26-1+14497.1
What OS are you using?
Linux
What is the version of your OS?
Ubuntu 25.04
Describe your system
No response
Are you using OpenCL GPU in darktable?
None
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in darktable's Copy & Import flow by reproducing the issue with the supplied FILE_EXTENSION pattern and JPG/RAF pair. Trace the filename handling when the second file is imported, including the repeated-file-number case; done means both imported extensions are lowercase, such as .jpg and .raf.
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
- 50/100