| Summary: | importing photos into albums results in time/date file override with current one | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | Marco Cimmino <cimmino.marco> |
| Component: | Import-Albums | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | VHI | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 0.9.0 | |
| Sentry Crash Report: | |||
|
Description
Marco Cimmino
2006-11-28 02:35:06 UTC
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 |