Fix exporting files

To avoid overwriting existing files, before exporting anything from a
parts file, check whether it contains valid data.
This commit is contained in:
d_komarov 2018-08-09 22:49:17 +03:00 committed by Arvid Norberg
parent 6d2541f131
commit 0bcf6cef23
1 changed files with 1 additions and 1 deletions

View File

@ -463,7 +463,7 @@ namespace libtorrent
return;
}
if (m_part_file)
if (m_part_file && use_partfile(i))
{
m_part_file->export_file(*f, fs.file_offset(i), fs.file_size(i), ec.ec);
if (ec)