From 726950f936d6926fb921f04ba272199d765dbe5e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 23 Sep 2012 02:16:03 +0000 Subject: [PATCH] merged client_test fix from libtorrent_aio --- examples/client_test.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 76c77fd61..0868ae12c 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -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); }