From 557ddca69349ee2f023113e643216a6f87d5e3b9 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 19 Jan 2011 08:42:17 +0000 Subject: [PATCH] fixed bug when remapping files --- src/storage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage.cpp b/src/storage.cpp index 4866c13a5..ea86f11c4 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -573,8 +573,8 @@ namespace libtorrent void storage::finalize_file(int index) { - TORRENT_ASSERT(index >= 0 && index < m_files.num_files()); - if (index < 0 || index >= m_files.num_files()) return; + TORRENT_ASSERT(index >= 0 && index < files().num_files()); + if (index < 0 || index >= files().num_files()) return; error_code ec; boost::intrusive_ptr f = open_file(files().begin() + index, file::read_write, ec); @@ -602,7 +602,7 @@ namespace libtorrent bool storage::rename_file(int index, std::string const& new_filename) { - if (index < 0 || index >= m_files.num_files()) return true; + if (index < 0 || index >= files().num_files()) return true; std::string old_name = combine_path(m_save_path, files().file_path(files().at(index))); m_pool.release(this, index);