Show
Ignore:
Timestamp:
12/23/07 03:05:00 (4 years ago)
Author:
rakshasa
Message:

* Added "d.set_directory_base" command that handles single and multi
file torrent equally.

* Fixed man page entry on 'umask', it should be 0022 not 0664.

* Cleaned up File and FileList? classes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/rtorrent/src/core/download.cc

    r1012 r1021  
    156156} 
    157157 
    158 // Clean up. 
    159158void 
    160159Download::set_root_directory(const std::string& path) { 
     
    162161 
    163162  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)); 
    175164 
    176165  bencode()->get_key("rtorrent").insert_key("directory", path);