forked from premiere/premiere-libtorrent
don't use full allocation on network drives (on windows)
This commit is contained in:
parent
647cda2934
commit
dd2e605796
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue