fixed bug where multi-file torrents with just a single file in left directories after storage::move_storage was called

This commit is contained in:
Arvid Norberg 2007-02-21 22:49:01 +00:00
parent ae059040da
commit de37f48179
1 changed files with 8 additions and 10 deletions

View File

@ -422,17 +422,15 @@ namespace libtorrent
path single_file = m_pimpl->info.begin_files()->path;
if (single_file.has_branch_path())
{
#if defined(_WIN32) && defined(UNICODE)
std::wstring wsave_path(safe_convert((save_path / single_file.branch_path())
.native_directory_string()));
CreateDirectory(wsave_path.c_str(), 0);
#else
create_directory(save_path / single_file.branch_path());
#endif
std::string const& trunk = *single_file.begin();
old_path = m_pimpl->save_path / trunk;
new_path = save_path / trunk;
}
else
{
old_path = m_pimpl->save_path / single_file;
new_path = save_path / m_pimpl->info.begin_files()->path;
}
old_path = m_pimpl->save_path / single_file;
new_path = save_path / m_pimpl->info.begin_files()->path;
}
else
{