Changeset 1021 for trunk/rtorrent/src/core/download.cc
- Timestamp:
- 12/23/07 03:05:00 (4 years ago)
- Files:
-
- 1 modified
-
trunk/rtorrent/src/core/download.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/rtorrent/src/core/download.cc
r1012 r1021 156 156 } 157 157 158 // Clean up.159 158 void 160 159 Download::set_root_directory(const std::string& path) { … … 162 161 163 162 control->core()->download_list()->close_directly(this); 164 165 if (path.empty()) { 166 fileList->set_root_dir("./" + (fileList->is_multi_file() ? m_download.name() : std::string())); 167 168 } else { 169 std::string fullPath = rak::path_expand(path); 170 171 fileList->set_root_dir(fullPath + 172 (*fullPath.rbegin() != '/' ? "/" : "") + 173 (fileList->is_multi_file() ? m_download.name() : std::string())); 174 } 163 fileList->set_root_dir(rak::path_expand(path)); 175 164 176 165 bencode()->get_key("rtorrent").insert_key("directory", path);
