diff --git a/src/storage.cpp b/src/storage.cpp index d4ca0245c..37d2f0e01 100755 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -195,6 +195,7 @@ namespace libtorrent , info(info) { save_path = complete(path); + assert(save_path.is_complete()); } impl(impl const& x) @@ -591,12 +592,13 @@ namespace libtorrent piece_manager::impl::impl( const torrent_info& info - , const path& save_path) + , const path& save_path) : m_storage(info, save_path) , m_info(info) , m_allocating(false) + , m_save_path(complete(save_path)); { - m_save_path = complete(save_path); + assert(m_save_path.is_complete()); } piece_manager::piece_manager( diff --git a/src/torrent.cpp b/src/torrent.cpp index 0446ad0e4..bba6c269d 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -176,7 +176,7 @@ namespace libtorrent , m_net_interface(net_interface.ip(), address::any_port) , m_upload_bandwidth_limit(std::numeric_limits::max()) , m_download_bandwidth_limit(std::numeric_limits::max()) - , m_save_path(save_path) + , m_save_path(complete(save_path)) { m_policy.reset(new policy(this)); bencode(std::back_inserter(m_metadata), metadata["info"]); @@ -213,7 +213,7 @@ namespace libtorrent , m_net_interface(net_interface.ip(), address::any_port) , m_upload_bandwidth_limit(std::numeric_limits::max()) , m_download_bandwidth_limit(std::numeric_limits::max()) - , m_save_path(save_path) + , m_save_path(complete(save_path)) { m_trackers.push_back(announce_entry(tracker_url)); m_requested_metadata.resize(256, 0);