Deletes torrents in the session directory when they are removed.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@293 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-20 15:40:01 +00:00
parent 91da0475e4
commit fa9a2d7e86
7 changed files with 22 additions and 10 deletions
+6 -4
View File
@@ -39,15 +39,17 @@ Manager::insert(const std::string& uri) {
create_http(uri);
}
void
Manager::iterator
Manager::erase(DownloadList::iterator itr) {
if ((*itr)->get_download().is_active())
throw std::logic_error("core::Manager::erase(...) called on an active download");
if ((*itr)->get_download().is_open())
(*itr)->close();
if (!(*itr)->get_download().is_open())
throw std::logic_error("core::Manager::erase(...) called on an closed download");
m_downloadList.erase(itr);
m_downloadStore.remove(*itr);
return m_downloadList.erase(itr);
}
void