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

* Properly use d.set_directory_base when

* Added get_{up,down}_{rate,total}.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/rtorrent/src/main.cc

    r1022 r1023  
    101101void 
    102102load_session_torrents(Control* c) { 
    103   // Load session torrents. 
    104   std::vector<std::string> l = c->core()->download_store()->get_formated_entries().make_list(); 
    105  
    106   for (std::vector<std::string>::iterator first = l.begin(), last = l.end(); first != last; ++first) { 
     103  utils::Directory entries = c->core()->download_store()->get_formated_entries(); 
     104 
     105  for (utils::Directory::const_iterator first = entries.begin(), last = entries.end(); first != last; ++first) { 
     106    // We don't really support session torrents that are links. These 
     107    // would be overwritten anyway on exit, and thus not really be 
     108    // useful. 
     109    if (!first->is_file()) 
     110      continue; 
     111 
    107112    core::DownloadFactory* f = new core::DownloadFactory(c->core()); 
    108113 
     
    110115    f->set_session(true); 
    111116    f->slot_finished(sigc::bind(sigc::ptr_fun(&rak::call_delete_func<core::DownloadFactory>), f)); 
    112     f->load(*first); 
     117    f->load(entries.path() + first->d_name); 
    113118    f->commit(); 
    114119  }