fixed last received time stamp so that it displays the last time data was actually received

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6910 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-11-27 20:01:09 +00:00
parent eab486f5db
commit 75c178082f
2 changed files with 2 additions and 14 deletions

View File

@ -1684,6 +1684,7 @@ bool ftController::FileDetails(const std::string &hash, FileInfo &info)
/* extract details */
info.hash = hash;
info.fname = it->second->mName;
info.lastTS = it->second->mCreator->lastRecvTimeStamp();
info.storage_permission_flags.clear() ;
info.transfer_info_flags = it->second->mFlags ;
info.priority = SPEED_NORMAL ;

View File

@ -937,21 +937,8 @@ int TransfersDialog::addItem(int row, const FileInfo &fileInfo, const std::map<s
qlonglong completed = fileInfo.transfered;
qlonglong remaining = fileInfo.size - fileInfo.transfered;
qlonglong downloadtime = (fileInfo.size - fileInfo.transfered) / (fileInfo.tfRate * 1024.0);
qint64 qi64LastDL = std::numeric_limits<qint64>::max();
qint64 qi64LastDL = fileInfo.lastTS ; //std::numeric_limits<qint64>::max();
{
QFileInfo file;
if (fileInfo.downloadStatus == FT_STATE_COMPLETE) {
file = QFileInfo(QString::fromUtf8(fileInfo.path.c_str()), QString::fromUtf8(fileInfo.fname.c_str()));
} else {
file = QFileInfo(QString::fromUtf8(rsFiles->getPartialsDirectory().c_str()), QString::fromUtf8(fileInfo.hash.c_str()));
}
/*Get Last Access on File */
if (file.exists()) {
qi64LastDL = file.lastModified().toTime_t();
}
}
QString strPath = QString::fromUtf8(fileInfo.path.c_str());
QString strPathAfterDL = strPath;
strPathAfterDL.replace(QString::fromUtf8(rsFiles->getDownloadDirectory().c_str()),"");