From 54047cd7a76431ade2f9cd21ab9104f263a9a22d Mon Sep 17 00:00:00 2001 From: Phenom Date: Thu, 6 Jul 2017 22:35:54 +0200 Subject: [PATCH] Fix multi download of same file. --- libretroshare/src/ft/ftcontroller.cc | 2 +- retroshare-gui/src/gui/RetroShareLink.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/ft/ftcontroller.cc b/libretroshare/src/ft/ftcontroller.cc index b50a52ed3..a349f8d1b 100644 --- a/libretroshare/src/ft/ftcontroller.cc +++ b/libretroshare/src/ft/ftcontroller.cc @@ -868,7 +868,7 @@ bool ftController::alreadyHaveFile(const RsFileHash& hash, FileInfo &info) return true ; // check for file lists - if (mSearch) return false; + if (!mSearch) return false; if (mSearch->search(hash, RS_FILE_HINTS_LOCAL | RS_FILE_HINTS_EXTRA | RS_FILE_HINTS_SPEC_ONLY, info)) return true ; diff --git a/retroshare-gui/src/gui/RetroShareLink.cpp b/retroshare-gui/src/gui/RetroShareLink.cpp index c3d2c0450..3c64e9021 100644 --- a/retroshare-gui/src/gui/RetroShareLink.cpp +++ b/retroshare-gui/src/gui/RetroShareLink.cpp @@ -1275,8 +1275,10 @@ static void processList(const QStringList &list, const QString &textSingular, co /* make path for downloaded file */ std::string path; path = fi.path;//Shared files has path with filename included - if (fi.downloadStatus == FT_STATE_COMPLETE) - path = fi.path + "/" + fi.fname; + + //Seems that all FileInfo get .path==filepath+filename + //if (fi.downloadStatus == FT_STATE_COMPLETE) + // path = fi.path + "/" + fi.fname; QFileInfo qinfo; qinfo.setFile(QString::fromUtf8(path.c_str()));