fixed rename_file
This commit is contained in:
parent
3722fff027
commit
7eb7dfdf17
|
@ -193,7 +193,7 @@ namespace libtorrent
|
||||||
file_storage const&, file_storage const*, fs::path const&, file_pool&);
|
file_storage const&, file_storage const*, fs::path const&, file_pool&);
|
||||||
|
|
||||||
TORRENT_EXPORT storage_interface* default_storage_constructor(
|
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;
|
struct disk_io_thread;
|
||||||
|
|
||||||
|
|
|
@ -392,13 +392,13 @@ namespace libtorrent
|
||||||
class storage : public storage_interface, boost::noncopyable
|
class storage : public storage_interface, boost::noncopyable
|
||||||
{
|
{
|
||||||
public:
|
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_files(fs)
|
||||||
, m_pool(fp)
|
, m_pool(fp)
|
||||||
, m_page_size(4096)
|
, m_page_size(4096)
|
||||||
, m_allocate_files(false)
|
, 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());
|
TORRENT_ASSERT(m_files.begin() != m_files.end());
|
||||||
m_save_path = fs::complete(path);
|
m_save_path = fs::complete(path);
|
||||||
|
@ -1455,9 +1455,9 @@ ret:
|
||||||
}
|
}
|
||||||
|
|
||||||
storage_interface* default_storage_constructor(file_storage const& fs
|
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 -----------------------------------------------------
|
// -- piece_manager -----------------------------------------------------
|
||||||
|
@ -1472,8 +1472,8 @@ ret:
|
||||||
, storage_mode_t sm)
|
, storage_mode_t sm)
|
||||||
: m_info(info)
|
: m_info(info)
|
||||||
, m_files(m_info->files())
|
, m_files(m_info->files())
|
||||||
, m_storage(sc(m_info->files(), &m_info->files() != &m_info->orig_files()
|
, m_storage(sc(m_info->orig_files(), &m_info->files() != &m_info->orig_files()
|
||||||
? &m_info->orig_files() : 0, save_path, fp))
|
? &m_info->files() : 0, save_path, fp))
|
||||||
, m_storage_mode(sm)
|
, m_storage_mode(sm)
|
||||||
, m_save_path(complete(save_path))
|
, m_save_path(complete(save_path))
|
||||||
, m_state(state_none)
|
, m_state(state_none)
|
||||||
|
|
Loading…
Reference in New Issue