fixed rename_file

This commit is contained in:
Arvid Norberg 2009-06-24 09:09:35 +00:00
parent 3722fff027
commit 7eb7dfdf17
2 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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)