Bug 234022 - Renaming tool "loose" original filename
Summary: Renaming tool "loose" original filename
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: AdvancedRename-dialog (show other bugs)
Version: 1.2.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-11 10:50 UTC by mnaugendre
Modified: 2022-02-01 06:23 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.3.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mnaugendre 2010-04-11 10:50:50 UTC
Version:           1.2.0 (using KDE 4.3.5)
OS:                Linux
Installed from:    Ubuntu Packages

Since I have installed the 1.2 version, the renaming option of the batch tool doesn't seem to work properly: the original file name is not pasted in the new name. Thus [file]_resz.[ext] gives the same resulting file name for all the pictures processed: _resz.JPG

screen copy available here: http://picasaweb.google.com/lh/photo/2QEcBMogoMluMYZipFegVgOxbZvKjsaAHhxp3y1uli4?feat=directlink
Comment 1 Andi Clemens 2010-04-11 12:39:10 UTC
Since the renaming tool itself works fine (in AlbumUI and CameraUI), it is BQM related. The problem also only occurs when using one of the convert tools, so I guess the filename is messed up in these tools. It worked fine in 1.1.0 though.
Comment 2 Jonas Norlander 2010-04-11 14:28:39 UTC
When importing from my camera in PTP mode I can also see this. The [file] option looks like it is returning an empty string. Importing from harddrive or card reader works. It worked in 1.1.0.
Rename example: [date:ISO]-[file]
Digikam 1.2.0 gives: 2010-04-03T14:11:08-.JPG
Digikam 1.1.0 gives: 2010-04-03T14:11:08-IMG_0226.JPG

KDE: 4.4.2
Kubuntu 9.10 with Backports PPA
Comment 3 mnaugendre 2010-04-16 11:46:42 UTC
In fact the [file] is not empty by itself, but it simply "vanishes" as soon as I add something else on the right, be it some string of my own, a number generated by the batch tool, the camera name, or whatever.
Comment 4 Andi Clemens 2010-04-18 08:33:34 UTC
(In reply to comment #3)
> In fact the [file] is not empty by itself, but it simply "vanishes" as soon as
> I add something else on the right, be it some string of my own, a number
> generated by the batch tool, the camera name, or whatever.

Yes, but still it only happens when you convert the image to some other file format, right?
This is the only situation where I can confirm it...
Comment 5 Jonas Norlander 2010-04-18 09:04:02 UTC
2010/4/18 Andi Clemens <andi.clemens@gmx.net>:
> Yes, but still it only happens when you convert the image to some other file
> format, right?
> This is the only situation where I can confirm it...

As I wrote. For me it happens during import from my camera (but only
PTP mode not with card reader) and I don't convert to any other
format.
Comment 6 mnaugendre 2010-04-18 18:54:09 UTC
(In reply to comment #4)

> Yes, but still it only happens when you convert the image to some other file
> format, right?
> This is the only situation where I can confirm it...

You're right: I just tested, and if I do only resize+copy, it seems to work OK.
Comment 7 Jens Mueller 2010-04-18 22:25:46 UTC
SVN commit 1116182 by jmueller:

do not update target suffix before advanced renaming take place, because advanced rename check if source path exist (I don't know if this check is needed - Andi?)

BUGS: 234022

 M  +2 -1      NEWS  
 M  +6 -4      utilities/queuemanager/queuelist.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1116182
Comment 8 Andi Clemens 2010-04-18 23:43:05 UTC
Now modifying the file extension doesn't work anymore... for example:
[date:ISO]_new_####.[ext]{upper}
Comment 9 Jens Mueller 2010-04-19 20:36:10 UTC
Andi - you are right - extension substitution must be done before advanced rename take place. But then you got the same error as described in this bug entry. 

Advanced rename check for file path existance before modifing here: http://lxr.kde.org/source/extragear/graphics/digikam/utilities/advancedrename/parser/options/filepropertiesoption.cpp#73

So you can't change to a new file-extension with advanced rename.

From my point of view this check is not necessary and shoul'nt be done inside of advanced rename. But maybe you have any reason to do this here?

Regards, Jens
Comment 10 Andi Clemens 2010-04-19 22:41:20 UTC
SVN commit 1116601 by aclemens:

Revert "do not update target suffix before advanced renaming take place...."

This reverts commit 65f33ce4ba0d654d358b82b5cfc2e9d126961415.

CCBUG:234022

 M  +0 -10     NEWS  
 M  +0 -5      utilities/advancedrename/parser/options/filepropertiesoption.cpp  
 M  +4 -6      utilities/queuemanager/queuelist.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1116601
Comment 11 Andi Clemens 2010-04-19 22:42:31 UTC
(In reply to comment #9)
> From my point of view this check is not necessary and shoul'nt be done inside
> of advanced rename. But maybe you have any reason to do this here?
> 
> Regards, Jens

I can't remember why I added this... but I guess it is not needed, and since my unit tests still run through ... I removed the file check from the renaming option again  ;-)
Comment 12 Andi Clemens 2010-04-20 07:43:05 UTC
I need to keep the file check though for the directory and metadata option...

@Jonas: I guess this should also fix the filename while importing, I haven't checked that yet, because my camera is broken and I need to buy a new one ;-(
Comment 13 caulier.gilles 2010-04-20 08:56:46 UTC
Andi,

If you need a new Nikon device (if i remember your camera that i have tested at previous coding sprint), try D5000. It's excelent. Just tested by a friend...

http://www.dpreview.com/reviews/nikond5000/

Gilles Caulier
Comment 14 Andi Clemens 2010-04-20 09:23:09 UTC
Hi Gilles,

yes right... I'm addicted to Nikon (I used to use Canon, but somehow Nikon won my heart now :-)).
I will take a look at this cam, too. Thanks for the tip!
Comment 15 Andi Clemens 2010-04-20 09:24:11 UTC
As this seems to be related to AdvancedRename and not BQM as I initially thought, I'll move the report into the right category...
Comment 16 Andi Clemens 2010-05-17 20:59:19 UTC
*** Bug 237805 has been marked as a duplicate of this bug. ***