flush and close the partfile when releasing files in default storage

This commit is contained in:
arvidn 2015-10-24 15:35:42 -04:00
parent 9399033588
commit e31433d952
1 changed files with 7 additions and 0 deletions

View File

@ -562,6 +562,13 @@ namespace libtorrent
void default_storage::release_files(storage_error&) void default_storage::release_files(storage_error&)
{ {
if (m_part_file)
{
error_code ignore;
m_part_file->flush_metadata(ignore);
m_part_file.reset();
}
// make sure we don't have the files open // make sure we don't have the files open
m_pool.release(this); m_pool.release(this);