merged client_test fix from libtorrent_aio

This commit is contained in:
Arvid Norberg 2012-09-23 02:16:03 +00:00
parent e4727df459
commit 726950f936
1 changed files with 4 additions and 1 deletions

View File

@ -1685,7 +1685,10 @@ int main(int argc, char* argv[])
if (i != files.end())
{
error_code ec;
remove(combine_path(monitor_dir, i->first), ec);
std::string path;
if (is_complete(i->first)) path = i->first;
else path = combine_path(monitor_dir, i->first);
remove(path, ec);
if (ec) printf("failed to delete .torrent file: %s\n", ec.message().c_str());
files.erase(i);
}