mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 14:49:21 +00:00
* Added support for using posix_fallocate on newly resized files.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1090 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -215,7 +215,12 @@ DownloadList::open_throw(Download* download) {
|
||||
if (download->download()->is_open())
|
||||
return;
|
||||
|
||||
download->download()->open(download->resume_flags());
|
||||
int openFlags = download->resume_flags();
|
||||
|
||||
if (rpc::call_command_value("system.file_allocate"))
|
||||
openFlags |= torrent::Download::open_enable_fallocate;
|
||||
|
||||
download->download()->open(openFlags);
|
||||
rpc::commands.call_catch("event.download.opened", rpc::make_target(download), torrent::Object(), "Download event action failed: ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user