mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-09-21 21:34:52 -04:00
Channels:
- Use destination directory when manually downloading a file from a channel - Show destination directory in channel details - Fixed utf8 issue when choosing the destination directory git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6902 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fc56b95d3f
commit
c447ab2829
6 changed files with 61 additions and 13 deletions
|
@ -31,6 +31,7 @@
|
|||
#include "util/misc.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
|
||||
#include <retroshare/rschannels.h>
|
||||
|
||||
/****
|
||||
* #define DEBUG_ITEM 1
|
||||
|
@ -599,6 +600,14 @@ void SubFileItem::download()
|
|||
|
||||
std::list<std::string> sources ;
|
||||
|
||||
std::string destination;
|
||||
if (!mChannelId.empty() && mType == SFI_TYPE_CHANNEL) {
|
||||
ChannelInfo ci;
|
||||
if (rsChannels->getChannelInfo(mChannelId, ci)) {
|
||||
destination = ci.destination_directory;
|
||||
}
|
||||
}
|
||||
|
||||
// Add possible direct sources.
|
||||
//
|
||||
FileInfo finfo ;
|
||||
|
@ -614,7 +623,7 @@ void SubFileItem::download()
|
|||
if (mSrcId != "")
|
||||
sources.push_back(mSrcId);
|
||||
|
||||
rsFiles->FileRequest(mFileName, mFileHash, mFileSize, "", RS_FILE_REQ_ANONYMOUS_ROUTING, sources);
|
||||
rsFiles->FileRequest(mFileName, mFileHash, mFileSize, destination, RS_FILE_REQ_ANONYMOUS_ROUTING, sources);
|
||||
|
||||
downloadButton->setEnabled(false);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue