reverted bug introduced a few check-ins ago. Fixed case when recursive_copy fails (don't remove the original files). Cleaned up callback dispatching in disk_io_thread in trunk. Improved unit tests for move_storage

This commit is contained in:
Arvid Norberg
2009-03-31 08:05:46 +00:00
parent 0070232f7c
commit c6017f9366
4 changed files with 26 additions and 12 deletions

View File

@@ -114,6 +114,8 @@ void run_storage_tests(boost::intrusive_ptr<torrent_info> info
{
TORRENT_ASSERT(fs.num_files() > 0);
create_directory(test_path / "temp_storage");
remove_all(test_path / "temp_storage2");
remove_all(test_path / "part0");
int num_pieces = fs.num_pieces();
TEST_CHECK(info->num_pieces() == num_pieces);
@@ -211,6 +213,7 @@ void run_storage_tests(boost::intrusive_ptr<torrent_info> info
ios.poll(ec);
TEST_CHECK(!exists(test_path / "temp_storage/test1.tmp"));
TEST_CHECK(!exists(test_path / "temp_storage2"));
TEST_CHECK(exists(test_path / "part0"));
// test move_storage with two files in the root directory