* 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:
rakshasa
2007-06-24 22:32:44 +00:00
parent e6e7e8a384
commit 9b95b51410
5 changed files with 16 additions and 5 deletions
+2 -2
View File
@@ -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);