mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 21:22:31 +00:00
* torrent::FileList::is_multi_file() now indicates whether the torrent
loaded was a multi-file torrent, not whether it contains more than one file. * Ignore attempts to load an empty URI in the client. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@925 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -158,14 +158,14 @@ Download::set_root_directory(const std::string& path) {
|
||||
torrent::FileList* fileList = m_download.file_list();
|
||||
|
||||
if (path.empty()) {
|
||||
fileList->set_root_dir("./" + (fileList->size_files() > 1 ? m_download.name() : std::string()));
|
||||
fileList->set_root_dir("./" + (fileList->is_multi_file() ? m_download.name() : std::string()));
|
||||
|
||||
} else {
|
||||
std::string fullPath = rak::path_expand(path);
|
||||
|
||||
fileList->set_root_dir(fullPath +
|
||||
(*fullPath.rbegin() != '/' ? "/" : "") +
|
||||
(fileList->size_files() > 1 ? m_download.name() : ""));
|
||||
(fileList->is_multi_file() ? m_download.name() : std::string()));
|
||||
}
|
||||
|
||||
bencode()->get_key("rtorrent").insert_key("directory", path);
|
||||
|
||||
Reference in New Issue
Block a user