Version: (using KDE KDE 3.5.5) Installed from: Ubuntu Packages - open digikam - create a new album - import new photos - results in all date and time files overrided this is related to kio::copy bug http://bugs.kde.org/show_bug.cgi?id=55804 but can be workarounded with some code :)
still confirmed in digikam 0.9rc1
Must be fixed before to release 0.9.0 final Gilles
SVN commit 611828 by mwiesweg: Set modification date in digikamalbums::put. Code copied from kdelibs/kioslave/file/file.cc BUG: 137993 M +17 -0 digikamalbums.cpp --- trunk/extragear/graphics/digikam/kioslave/digikamalbums.cpp #611827:611828 @@ -457,6 +457,23 @@ } } + // set modification time + const QString mtimeStr = metaData( "modified" ); + if ( !mtimeStr.isEmpty() ) { + QDateTime dt = QDateTime::fromString( mtimeStr, Qt::ISODate ); + if ( dt.isValid() ) { + KDE_struct_stat dest_statbuf; + if (KDE_stat( _dest.data(), &dest_statbuf ) == 0) { + struct utimbuf utbuf; + utbuf.actime = dest_statbuf.st_atime; // access time, unchanged + utbuf.modtime = dt.toTime_t(); // modification time + kdDebug() << k_funcinfo << "setting modtime to " << utbuf.modtime << endl; + utime( _dest.data(), &utbuf ); + } + } + + } + // First check if the file is already in database if (!findImage(album.id, url.fileName())) {
0.9rc2 has still this bug, 0.9 file will have this patch? Thanx
Yes, this have been commited recently by Marcel. Gilles