merged fix from R_0_16
This commit is contained in:
parent
db500b674b
commit
f2c89cd770
|
@ -894,8 +894,12 @@ namespace libtorrent
|
|||
open_mode_t const& m = mode_array[mode & rw_mask];
|
||||
DWORD a = attrib_array[(mode & attribute_mask) >> 12];
|
||||
|
||||
// one might think it's a good idea to pass in FILE_FLAG_RANDOM_ACCESS. It
|
||||
// turns out that it isn't. That flag will break your operating system:
|
||||
// http://support.microsoft.com/kb/2549369
|
||||
|
||||
DWORD flags
|
||||
= ((mode & random_access) ? FILE_FLAG_RANDOM_ACCESS : 0)
|
||||
= ((mode & random_access) ? 0 : FILE_FLAG_SEQUENTIAL_SCAN)
|
||||
| (a ? a : FILE_ATTRIBUTE_NORMAL)
|
||||
| ((mode & no_buffer) ? FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING : 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue