mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-29 08:37:36 -04:00
Fix multi download of same file.
This commit is contained in:
parent
c630f1fa89
commit
54047cd7a7
2 changed files with 5 additions and 3 deletions
|
@ -868,7 +868,7 @@ bool ftController::alreadyHaveFile(const RsFileHash& hash, FileInfo &info)
|
||||||
return true ;
|
return true ;
|
||||||
|
|
||||||
// check for file lists
|
// 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))
|
if (mSearch->search(hash, RS_FILE_HINTS_LOCAL | RS_FILE_HINTS_EXTRA | RS_FILE_HINTS_SPEC_ONLY, info))
|
||||||
return true ;
|
return true ;
|
||||||
|
|
||||||
|
|
|
@ -1275,8 +1275,10 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||||
/* make path for downloaded file */
|
/* make path for downloaded file */
|
||||||
std::string path;
|
std::string path;
|
||||||
path = fi.path;//Shared files has path with filename included
|
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;
|
QFileInfo qinfo;
|
||||||
qinfo.setFile(QString::fromUtf8(path.c_str()));
|
qinfo.setFile(QString::fromUtf8(path.c_str()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue