From 83da84452f0ae6c821d642134efb46293cf7f343 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 17 Jan 2011 08:02:23 +0000 Subject: [PATCH] fixed bug in remap_files --- ChangeLog | 1 + src/torrent_info.cpp | 2 ++ 2 files changed, 3 insertions(+) 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