From 7eb7dfdf178f54c94952d2fe175a5b4e4cfc8784 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 24 Jun 2009 09:09:35 +0000 Subject: [PATCH] fixed rename_file --- include/libtorrent/storage.hpp | 2 +- src/storage.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/libtorrent/storage.hpp b/include/libtorrent/storage.hpp index e71c9e16b..e65602a64 100644 --- a/include/libtorrent/storage.hpp +++ b/include/libtorrent/storage.hpp @@ -193,7 +193,7 @@ namespace libtorrent file_storage const&, file_storage const*, fs::path const&, file_pool&); TORRENT_EXPORT storage_interface* default_storage_constructor( - file_storage const&, file_storage const* orig, fs::path const&, file_pool&); + file_storage const&, file_storage const* mapped, fs::path const&, file_pool&); struct disk_io_thread; diff --git a/src/storage.cpp b/src/storage.cpp index 40394c0d1..37e8b35b6 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -392,13 +392,13 @@ namespace libtorrent class storage : public storage_interface, boost::noncopyable { public: - storage(file_storage const& fs, file_storage const* orig, fs::path const& path, file_pool& fp) + storage(file_storage const& fs, file_storage const* mapped, fs::path const& path, file_pool& fp) : m_files(fs) , m_pool(fp) , m_page_size(4096) , m_allocate_files(false) { - if (orig) m_mapped_files.reset(new file_storage(*orig)); + if (mapped) m_mapped_files.reset(new file_storage(*mapped)); TORRENT_ASSERT(m_files.begin() != m_files.end()); m_save_path = fs::complete(path); @@ -1455,9 +1455,9 @@ ret: } storage_interface* default_storage_constructor(file_storage const& fs - , file_storage const* orig, fs::path const& path, file_pool& fp) + , file_storage const* mapped, fs::path const& path, file_pool& fp) { - return new storage(fs, orig, path, fp); + return new storage(fs, mapped, path, fp); } // -- piece_manager ----------------------------------------------------- @@ -1472,8 +1472,8 @@ ret: , storage_mode_t sm) : m_info(info) , m_files(m_info->files()) - , m_storage(sc(m_info->files(), &m_info->files() != &m_info->orig_files() - ? &m_info->orig_files() : 0, save_path, fp)) + , m_storage(sc(m_info->orig_files(), &m_info->files() != &m_info->orig_files() + ? &m_info->files() : 0, save_path, fp)) , m_storage_mode(sm) , m_save_path(complete(save_path)) , m_state(state_none)