From 44995ee41d554ea6a4510f948dd7f94f24f318e6 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 29 Apr 2012 04:20:02 +0000 Subject: [PATCH] one more UNC path fix --- ChangeLog | 1 + src/torrent.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 12d9a9ac5..cf1990b59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ + * fixed UNC path normalization (on windows, unless UNC paths are disabled) * fixed possible crash when enabling multiple connections per IP * fixed typo in win vista specific code, breaking the build * change default of rate_limit_utp to true diff --git a/src/torrent.cpp b/src/torrent.cpp index 4713211bd..b632caa64 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -6262,12 +6262,19 @@ namespace libtorrent if (m_owning_storage.get()) { - m_owning_storage->async_move_storage(save_path +#if TORRENT_USE_UNC_PATHS + std::string path = canonicalize_path(save_path); +#else + std::string const& path = save_path; +#endif + m_owning_storage->async_move_storage(path , boost::bind(&torrent::on_storage_moved, shared_from_this(), _1, _2)); } else { - m_save_path = save_path; +#if TORRENT_USE_UNC_PATHS + m_save_path = canonicalize_path(save_path); +#endif if (alerts().should_post()) { alerts().post_alert(storage_moved_alert(get_handle(), m_save_path));