don't use full allocation on network drives (on windows)

This commit is contained in:
Arvid Norberg 2014-06-07 02:57:24 +00:00
parent 647cda2934
commit dd2e605796
2 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,6 @@
1.0 release
* don't use full allocation on network drives (on windows)
* added clear_piece_deadlines() to remove all piece deadlines
* improve queuing logic of inactive torrents (dont_count_slow_torrents)
* expose optimistic unchoke logic to plugins

View File

@ -405,6 +405,14 @@ namespace libtorrent
bool default_storage::initialize(bool allocate_files)
{
m_allocate_files = allocate_files;
#ifdef TORRENT_WINDOWS
// don't do full file allocations on network drives
int drive_type = GetDriveType(m_save_path.c_str());
if (drive_type == DRIVE_REMOTE)
m_allocate_files = false;
#endif
error_code ec;
m_file_created.resize(files().num_files(), false);