Optimized the fill of the up- and downloads in TransfersDialog.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5191 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-06-01 20:51:14 +00:00
parent 40b1f6f053
commit 569d463f02
6 changed files with 308 additions and 312 deletions

View file

@ -1625,7 +1625,7 @@ bool ftController::FileDetails(const std::string &hash, FileInfo &info)
info.fname = it->second->mName;
info.flags = it->second->mFlags;
info.priority = SPEED_NORMAL ;
info.path = RsDirUtil::removeTopDir(it->second->mDestination); /* remove fname */
RsDirUtil::removeTopDir(it->second->mDestination, info.path); /* remove fname */
info.queue_position = it->second->mQueuePosition ;
/* get list of sources from transferModule */
@ -1982,7 +1982,7 @@ bool ftController::saveList(bool &cleanup, std::list<RsItem *>& saveData)
rft->file.name = fit->second->mName;
rft->file.hash = fit->second->mHash;
rft->file.filesize = fit->second->mSize;
rft->file.path = RsDirUtil::removeTopDir(fit->second->mDestination); /* remove fname */
RsDirUtil::removeTopDir(fit->second->mDestination, rft->file.path); /* remove fname */
rft->flags = fit->second->mFlags;
rft->state = fit->second->mState;
fit->second->mTransfer->getFileSources(rft->allPeerIds.ids);
@ -2031,7 +2031,7 @@ bool ftController::saveList(bool &cleanup, std::list<RsItem *>& saveData)
rft->file.name = pit->mName;
rft->file.hash = pit->mHash;
rft->file.filesize = pit->mSize;
rft->file.path = RsDirUtil::removeTopDir(pit->mDest); /* remove fname */
RsDirUtil::removeTopDir(pit->mDest, rft->file.path); /* remove fname */
rft->flags = pit->mFlags;
rft->allPeerIds.ids = pit->mSrcIds;
}