forked from premiere/premiere-libtorrent
fix partfile on windows
This commit is contained in:
parent
ce80e8c0c1
commit
9bfbb8a52a
|
@ -350,6 +350,8 @@ namespace libtorrent
|
||||||
|
|
||||||
if (m_piece_map.empty())
|
if (m_piece_map.empty())
|
||||||
{
|
{
|
||||||
|
m_file.close();
|
||||||
|
|
||||||
// if we don't have any pieces left in the
|
// if we don't have any pieces left in the
|
||||||
// part file, remove it
|
// part file, remove it
|
||||||
std::string p = combine_path(m_path, m_name);
|
std::string p = combine_path(m_path, m_name);
|
||||||
|
|
|
@ -126,7 +126,9 @@ int test_main()
|
||||||
|
|
||||||
// we just removed the last piece. The partfile does not
|
// we just removed the last piece. The partfile does not
|
||||||
// contain anything anymore, it should have deleted itself
|
// contain anything anymore, it should have deleted itself
|
||||||
TEST_CHECK(!exists(combine_path(combine_path(cwd, "partfile_test_dir2"), "partfile.parts")));
|
TEST_CHECK(!exists(combine_path(combine_path(cwd, "partfile_test_dir2"), "partfile.parts"), ec));
|
||||||
|
TEST_CHECK(!ec);
|
||||||
|
if (ec) fprintf(stderr, "exists: %s\n", ec.message().c_str());
|
||||||
|
|
||||||
output.close();
|
output.close();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue