Changeset View
Changeset View
Standalone View
Standalone View
smb/kio_smb_dir.cpp
Show First 20 Lines • Show All 412 Lines • ▼ Show 20 Line(s) | 232 | { | |||
---|---|---|---|---|---|
413 | 413 | | |||
414 | // Restore the mtime on the file. | 414 | // Restore the mtime on the file. | ||
415 | const QString mtimeStr = metaData("modified"); | 415 | const QString mtimeStr = metaData("modified"); | ||
416 | qCDebug(KIO_SMB) << "modified:" << mtimeStr; | 416 | qCDebug(KIO_SMB) << "modified:" << mtimeStr; | ||
417 | if (!mtimeStr.isEmpty()) { | 417 | if (!mtimeStr.isEmpty()) { | ||
418 | QDateTime dt = QDateTime::fromString(mtimeStr, Qt::ISODate); | 418 | QDateTime dt = QDateTime::fromString(mtimeStr, Qt::ISODate); | ||
419 | if (dt.isValid()) { | 419 | if (dt.isValid()) { | ||
420 | struct utimbuf utbuf; | 420 | struct utimbuf utbuf; | ||
421 | utbuf.actime = QFileInfo(file).lastRead().toTime_t(); // access time, unchanged | 421 | utbuf.actime = QFileInfo(dstFile).lastRead().toTime_t(); // access time, unchanged | ||
422 | utbuf.modtime = dt.toTime_t(); // modification time | 422 | utbuf.modtime = dt.toTime_t(); // modification time | ||
423 | utime(QFile::encodeName(dstFile).constData(), &utbuf); | 423 | utime(QFile::encodeName(dstFile).constData(), &utbuf); | ||
424 | } | 424 | } | ||
425 | } | 425 | } | ||
426 | 426 | | |||
427 | finished(); | 427 | finished(); | ||
428 | } | 428 | } | ||
429 | 429 | | |||
▲ Show 20 Lines • Show All 355 Lines • Show Last 20 Lines |