Skip to content

Copy & Import: Lower-case bug $(FILE_EXTENSION,,) #20259

@digital-tinta

Description

@digital-tinta

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

  1. Click copy & import
  2. With "file naming pattern" set to: $(JOBCODE)-$(EXIF_YEAR)$(EXIF_MONTH)$(EXIF_DAY)-$(FILE_NAME:4:4).$(FILE_EXTENSION,,)
  3. Select, for instance, DSCF1001.JPG; DSCF1001.RAF.
  4. 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

No response

Logfile | Screenshot | Screencast

No response

Commit

No response

Where did you obtain darktable from?

distro packaging

darktable version

5.5.0~git139.4f4d6644-1+13622.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions