Bug 99193 - Batch Rename image reset time
Summary: Batch Rename image reset time
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: AdvancedRename-metadata (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-12 12:57 UTC by Cedric Pradalier
Modified: 2022-02-01 06:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0
Sentry Crash Report:


Attachments
renameimagesdialog.diff (715 bytes, text/plain)
2005-03-13 22:08 UTC, Cedric Pradalier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cedric Pradalier 2005-02-12 12:57:04 UTC
Version:           0.1.1 (using KDE 3.3.2,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-6)
OS:                Linux (ppc) release 2.6.8-powerpc

This bug is the same as bug 91917, marked resolved, but still present after cvs update 2005/02/12.

As a reminder, after batch process renaming images, all the dates are set to 1970/01/01, 10:59
Comment 1 Tom Albers 2005-03-06 17:46:15 UTC
Ok, tried to reproduce this, but whatever I try the date stays the same. Did you update the kipiplugins as well or did you only update digikamimageplugins and digikam?
Comment 2 Cedric Pradalier 2005-03-06 21:56:58 UTC
According to Tom Albers, on 6 Mar 2005 16:46:16 -0000, 
>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
>         
>http://bugs.kde.org/show_bug.cgi?id=99193         
>
>
>
>
>------- Additional Comments From tomalbers kde nl  2005-03-06 17:46 -------
>Ok, tried to reproduce this, but whatever I try the date stays the same. Did you update
>the kipiplugins as well or did you only update digikamimageplugins and digikam?
>
I updated all kdeextralib-1, digikam and digikamimageplugin. On my version, it is
perfectly reproductible, again when adding photos yesterday...
I will try to re-update tonight and I'll tell you if this has
change.

Comment 3 Cedric Pradalier 2005-03-07 05:46:01 UTC
Tom Albers wrote:

>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
>         
>http://bugs.kde.org/show_bug.cgi?id=99193         
>
>
>
>
>------- Additional Comments From tomalbers kde nl  2005-03-06 17:46 -------
>Ok, tried to reproduce this, but whatever I try the date stays the same. Did you update the kipiplugins as well or did you only update digikamimageplugins and digikam?
>  
>
I retried with a freshly updated cvs (kdeextragear-lib-1, digikam and 
digikamimageplugin).
+ I select an image with a proper date.
+ I select the batch process/rename image, and change name from upper to 
lower case, not that it only occurs if I tick the "remove original box".
I got the following output :
digikam: WARNING: [virtual void DigikamImageInfo::setTime(const 
QDateTime&, KIPI::TimeSpec)] 
kipiinterface::DigikamImageInfo::setTime:Invalid datetime specified
+ Now the modification date is back to 1970 in the popup window. I can 
reset it to exif date and goto step 1

Comment 4 Achim Bohnet 2005-03-08 20:08:09 UTC
I can reproduce here on debian i386:  digikam 0.7.2-1
kipi-plugins 0.1~beta2-1

Can it be that you have several version installed?
Any of those pkgs installed?

   dpkg -l digikam digikamimageplugins kipi-plugins libkexif\* libkipi\*

Or maybe several cvs version?

   locate kipiplugin_batchprocessimages.so

what's your output of: kde-config --path module
is the 'right' version of kipiplugin_batchprocessimages.so in this path?

when you configure kdeextragear-libs etc  what are you configure option?

Sidenote : you can also add to sources.list

deb-src http://www.mpe.mpg.de/~ach/debian/experimental ./

and build ppc versions yourself.  For libkexif0 libkipi1 digikam kipi-plugins:

   fakeroot apt-get -b source <pkg>
   su dpkg -i <pkg>*.deb

Achim
Comment 5 Achim Bohnet 2005-03-08 21:47:23 UTC
#4:  Argll,  of course  'I can not reproduce'  not 'I can reproduce'.
     Sorry :(

Achim
Comment 6 Cedric Pradalier 2005-03-08 21:51:05 UTC
According to Achim Bohnet, on 8 Mar 2005 19:08:11 -0000, 
>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
>         
>http://bugs.kde.org/show_bug.cgi?id=99193         
>
>
>
>
>------- Additional Comments From ach mpe mpg de  2005-03-08 20:08 -------
>I can reproduce here on debian i386:  digikam 0.7.2-1
>kipi-plugins 0.1~beta2-1
>
>Can it be that you have several version installed?
>Any of those pkgs installed?
>
>   dpkg -l digikam digikamimageplugins kipi-plugins libkexif\* libkipi\*

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
pn  digikam        <none>         (no description available)
pn  digikamimagepl <none>         (no description available)
un  kipi-plugins   <none>         (no description available)
pn  libkexif-0.1   <none>         (no description available)
un  libkexif-dev   <none>         (no description available)
ii  libkexif0      0.1-2          KDE library to read/edit EXIF informations (
pn  libkexif0-dev  <none>         (no description available)
pn  libkipi-0.1    <none>         (no description available)
un  libkipi-dev    <none>         (no description available)
ii  libkipi0       0.1-2          library for apps that want to use kipi-plugi
pn  libkipi0-dev   <none>         (no description available)


>
>Or maybe several cvs version?
>
>   locate kipiplugin_batchprocessimages.so

No: only one

/home/pradalie/digiKam/kdeextragear-libs-1/kipi-plugins/batchprocessimages/.libs/kipiplug
in_batchprocessimages.so 
/home/pradalie/digiKam/lib/kde3/kipiplugin_batchprocessimages.so


>
>what's your output of: kde-config --path module
>is the 'right' version of kipiplugin_batchprocessimages.so in this path?

/home/pradalie/.kde/lib/kde3/:/home/pradalie/digiKam/lib/kde3/:/usr/lib/kde3/
yes

>
>when you configure kdeextragear-libs etc  what are you configure option?

--prefix=$HOME/digiKam

HTH

Comment 7 Cedric Pradalier 2005-03-08 22:12:35 UTC
According to Achim Bohnet, on 8 Mar 2005 20:47:24 -0000, 
>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
>         
>http://bugs.kde.org/show_bug.cgi?id=99193         
>
>
>
>
>------- Additional Comments From ach mpe mpg de  2005-03-08 21:47 -------
>#4:  Argll,  of course  'I can not reproduce'  not 'I can reproduce'.
>     Sorry :(
>
>Achim
>

It also appear with a fresh new cvs compile on debian/intel and on debian/ppc.
I'll try to track this bug out myself this weekend.

Cheers

Comment 8 Cedric Pradalier 2005-03-12 02:10:03 UTC
After some investigation, this bug is due to a problem in renameimagesdialog.cpp
when the remove original box is checked, the rename is made with KIO::move, but on the
result handler, the original file is accessed to get correct the time, then the original
file is deleted. But after the move, the original file does not exists any longer!

I think this is a good idea to keep the original until we have copied the informations,
and use always KIO::copy. 

I'll let you choose the best way to correct that.

As a side note, I updated today...


According to Achim Bohnet, on 8 Mar 2005 19:08:11 -0000, 
>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
>         
>http://bugs.kde.org/show_bug.cgi?id=99193         
>
>
>
>
>------- Additional Comments From ach mpe mpg de  2005-03-08 20:08 -------
>I can reproduce here on debian i386:  digikam 0.7.2-1
>kipi-plugins 0.1~beta2-1
>
>Can it be that you have several version installed?
>Any of those pkgs installed?
>
>   dpkg -l digikam digikamimageplugins kipi-plugins libkexif\* libkipi\*
>
>Or maybe several cvs version?
>
>   locate kipiplugin_batchprocessimages.so
>
>what's your output of: kde-config --path module
>is the 'right' version of kipiplugin_batchprocessimages.so in this path?
>
>when you configure kdeextragear-libs etc  what are you configure option?
>
>Sidenote : you can also add to sources.list
>
>deb-src http://www.mpe.mpg.de/~ach/debian/experimental ./
>
>and build ppc versions yourself.  For libkexif0 libkipi1 digikam kipi-plugins:
>
>   fakeroot apt-get -b source <pkg>
>   su dpkg -i <pkg>*.deb
>
>Achim
>

Comment 9 Mikolaj Machowski 2005-03-12 12:34:24 UTC
As a sidenote: looks like rotating of images in main window also is
changing image date. That shouldn't happen.
Comment 10 caulier.gilles 2005-03-13 20:24:27 UTC
Cedric,

This problem is relevant of old digikamplugins (provide with 0.6.x digiKam serie) port to kipi project. This problem do not exist in the old implementation.

I'm right with your suggestion about to solve the problem. Please, can you provide a patch to fix renameimagesdialog.cpp implementation.

Thanks in advance

Gilles Caulier
Comment 11 Cedric Pradalier 2005-03-13 22:08:26 UTC
According to Gilles Caulier, on 13 Mar 2005 19:24:31 -0000, 
>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
>         
>http://bugs.kde.org/show_bug.cgi?id=99193         
>
>
>
>
>------- Additional Comments From caulier.gilles free fr  2005-03-13 20:24 -------
>Cedric,
>
>This problem is relevant of old digikamplugins (provide with 0.6.x digiKam serie) port to
>kipi project. This problem do not exist in the old implementation.
>
>I'm right with your suggestion about to solve the problem. Please, can you provide a
>patch to fix renameimagesdialog.cpp implementation.
>
>Thanks in advance
>
>Gilles Caulier
>


The attached file seems to work; 


Created an attachment (id=10093)
renameimagesdialog.diff
Comment 12 caulier.gilles 2005-03-13 23:56:13 UTC
CVS commit by cgilles: 

patch from Cedric Pradalier.
BUGS:99193
CCBUGS:99193


  M +2 -6      renameimagesdialog.cpp   1.32


--- kdeextragear-libs-1/kipi-plugins/batchprocessimages/renameimagesdialog.cpp  #1.31:1.32
@@ -269,4 +269,5 @@ void RenameImagesDialog::slotResult( KIO
                 {
                 m_interface->delImage( src );
+                KIO::Job* job = KIO::del( src );
                 }
         else
@@ -497,10 +498,5 @@ void RenameImagesDialog::copyItemOperati
     KURL target = m_upload->path();
     target.addPath( item->nameDest() );
-    KIO::CopyJob* job;
-    
-    if ( m_removeOriginal->isChecked() == true )
-       job = KIO::move(item->pathSrc(), target, false);
-    else
-       job = KIO::copy(item->pathSrc(), target, false);
+    KIO::CopyJob* job = KIO::copy(item->pathSrc(), target, false);
 
     connect(job, SIGNAL(result(KIO::Job*)),
Comment 13 caulier.gilles 2005-03-13 23:56:14 UTC
CVS commit by cgilles: 

patch from Cedric Pradalier.
BUGS:99193
CCBUGS:99193


  M +2 -6      renameimagesdialog.cpp   1.32


--- kdeextragear-libs-1/kipi-plugins/batchprocessimages/renameimagesdialog.cpp  #1.31:1.32
@@ -269,4 +269,5 @@ void RenameImagesDialog::slotResult( KIO
                 {
                 m_interface->delImage( src );
+                KIO::Job* job = KIO::del( src );
                 }
         else
@@ -497,10 +498,5 @@ void RenameImagesDialog::copyItemOperati
     KURL target = m_upload->path();
     target.addPath( item->nameDest() );
-    KIO::CopyJob* job;
-    
-    if ( m_removeOriginal->isChecked() == true )
-       job = KIO::move(item->pathSrc(), target, false);
-    else
-       job = KIO::copy(item->pathSrc(), target, false);
+    KIO::CopyJob* job = KIO::copy(item->pathSrc(), target, false);
 
     connect(job, SIGNAL(result(KIO::Job*)),