fix creating directory in test_utp

This commit is contained in:
Arvid Norberg 2019-11-18 01:44:36 +01:00 committed by Arvid Norberg
parent fbb7c1e2e3
commit 8abd878ed4
1 changed files with 7 additions and 7 deletions

View File

@ -53,8 +53,8 @@ void test_transfer()
{
// in case the previous run was terminated
error_code ec;
remove_all("./tmp1_utp", ec);
remove_all("./tmp2_utp", ec);
remove_all("tmp1_utp", ec);
remove_all("tmp2_utp", ec);
// these are declared before the session objects
// so that they are destructed last. This enables
@ -85,13 +85,13 @@ void test_transfer()
torrent_handle tor2;
ec.clear();
create_directory("./tmp1_utp", ec);
create_directory("tmp1_utp", ec);
if (ec)
{
std::printf("ERROR: failed to create test directory \"./tmp1_utp\": (%d) %s\n"
std::printf("ERROR: failed to create test directory \"tmp1_utp\": (%d) %s\n"
, ec.value(), ec.message().c_str());
}
std::ofstream file("./tmp1_utp/temporary");
std::ofstream file("tmp1_utp/temporary");
std::shared_ptr<torrent_info> t = ::create_torrent(&file, "temporary", 128 * 1024, 6, false);
file.close();
@ -141,8 +141,8 @@ TORRENT_TEST(utp)
test_transfer();
error_code ec;
remove_all("./tmp1_utp", ec);
remove_all("./tmp2_utp", ec);
remove_all("tmp1_utp", ec);
remove_all("tmp2_utp", ec);
}
TORRENT_TEST(compare_less_wrap)