From 0d29dbbfbe26e270e0dc9602e204a0bf86f8bab7 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 4 Mar 2012 10:54:10 +0000 Subject: [PATCH] don't add the UNC path prefix to network paths --- src/file.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/file.cpp b/src/file.cpp index 08bda8c15..fb7cec81e 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -803,7 +803,10 @@ namespace libtorrent #if TORRENT_USE_UNC_PATHS // UNC paths must be absolute - std::string p = "\\\\?\\" + (is_complete(path) ? path : combine_path(current_working_directory(), path)); + std::string p; + // network paths are not supported by UNC paths + if (path.substr(0,2) == "\\\\") p = path; + else p = "\\\\?\\" + (is_complete(path) ? path : combine_path(current_working_directory(), path)); #else std::string const& p = path; #endif