diff --git a/ChangeLog b/ChangeLog index 286f391ec..3adafc2a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -70,6 +70,7 @@ incoming connection * added more detailed instrumentation of the disk I/O thread + * fixed bug in torrent_info::remap_files * fix python binding for wait_for_alert * only apply privileged port filter to DHT-only peers diff --git a/src/torrent_info.cpp b/src/torrent_info.cpp index bf086026b..de7c27db7 100644 --- a/src/torrent_info.cpp +++ b/src/torrent_info.cpp @@ -497,6 +497,8 @@ namespace libtorrent if (m_files.total_size() != f.total_size()) return; copy_on_write(); m_files = f; + m_files.set_num_pieces(m_orig_files->num_pieces()); + m_files.set_piece_length(m_orig_files->piece_length()); } #ifndef TORRENT_NO_DEPRECATE