Bug 457312 - Using customized filename with camera name deletes previous name parts
Summary: Using customized filename with camera name deletes previous name parts
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: AdvancedRename-BatchQueueManager (other bugs)
Version First Reported In: 7.6.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-30 18:34 UTC by Dirk
Modified: 2022-07-30 18:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 7.8.0
Sentry Crash Report:


Attachments
example image that can reproduce the problem (399.36 KB, image/jpeg)
2022-07-30 18:34 UTC, Dirk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk 2022-07-30 18:34:38 UTC
Created attachment 151005 [details]
example image that can reproduce the problem

SUMMARY
within batch queue manager file renaming with customize filename is used - e.g. a 4 digit number followed by Camera name: "####[cam]".
Depending of the camera name it sometimes happens that the camera name deletes all entries ahead - in this case the 4 digit number.
The camera name in the metadata of the attached image is "Kodak CLAS Digital Film Scanner / HR200", but batch queue manager uses HR200 only. 
I have the suspicion that the "/" confuses the renaming process. 

STEPS TO REPRODUCE
1. start batch queue manager with the image attached
2. choose "customize filenames" within File Renaming (and choose any processing)
3. in renaming options choose "###" for continuous numbering followed by the camera name "[cam]"
4. as soon as you add the camera name the previous number disappears.

OBSERVED RESULT
camera name deletes previous parts in file name schema.

EXPECTED RESULT
camera name should be added to previous filename parts

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version: 5.22.5 
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
reproducible also with version 7.7.0
Comment 1 Maik Qualmann 2022-07-30 18:38:45 UTC
The "/" is a forbidden character in file names because it is a path separator. There will be no fix for this from our side.

Maik
Comment 2 Maik Qualmann 2022-07-30 18:40:36 UTC
Normally, "/" is replaced with "_" in Advanced Rename. I have a look at it.

Maik
Comment 3 Maik Qualmann 2022-07-30 18:53:42 UTC
Git commit 7551f5539efbc1bc8e07d42f5d098529358c985c by Maik Qualmann.
Committed on 30/07/2022 at 18:53.
Pushed by mqualmann into branch 'qt5-maintenance'.

add missing check for path separator in the camera option
FIXED-IN: 7.8.0

M  +1    -1    NEWS
M  +2    -0    core/utilities/advancedrename/parser/options/cameranameoption.cpp

https://invent.kde.org/graphics/digikam/commit/7551f5539efbc1bc8e07d42f5d098529358c985c