From 3e5ab73127d895c85d318e737f2864bf763fe91b Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 9 Jun 2014 04:08:41 +0000 Subject: [PATCH] fix windows build --- src/storage.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/storage.cpp b/src/storage.cpp index b303a1aa0..2e69910f4 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -408,7 +408,13 @@ namespace libtorrent #ifdef TORRENT_WINDOWS // don't do full file allocations on network drives - int drive_type = GetDriveType(m_save_path.c_str()); +#if TORRENT_USE_WSTRING + std::wstring f = convert_to_wstring(m_save_path); + int drive_type = GetDriveTypeW(f.c_str()); +#else + int drive_type = GetDriveTypeA(m_save_path.c_str()); +#endif + if (drive_type == DRIVE_REMOTE) m_allocate_files = false; #endif