forked from premiere/premiere-libtorrent
fix hidden attribute in file class
This commit is contained in:
parent
ed8fffc1a6
commit
77191a3820
|
@ -1419,14 +1419,14 @@ namespace libtorrent
|
||||||
|
|
||||||
TORRENT_ASSERT((mode & rw_mask) < sizeof(mode_array)/sizeof(mode_array[0]));
|
TORRENT_ASSERT((mode & rw_mask) < sizeof(mode_array)/sizeof(mode_array[0]));
|
||||||
open_mode_t const& m = mode_array[mode & rw_mask];
|
open_mode_t const& m = mode_array[mode & rw_mask];
|
||||||
DWORD a = attrib_array[(mode & attribute_mask) >> 12];
|
DWORD const a = attrib_array[(mode & attribute_mask) >> 9];
|
||||||
|
|
||||||
// one might think it's a good idea to pass in FILE_FLAG_RANDOM_ACCESS. It
|
// 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:
|
// turns out that it isn't. That flag will break your operating system:
|
||||||
// http://support.microsoft.com/kb/2549369
|
// http://support.microsoft.com/kb/2549369
|
||||||
|
|
||||||
DWORD flags = ((mode & random_access) ? 0 : FILE_FLAG_SEQUENTIAL_SCAN)
|
DWORD flags = ((mode & random_access) ? 0 : FILE_FLAG_SEQUENTIAL_SCAN)
|
||||||
| (a ? a : FILE_ATTRIBUTE_NORMAL)
|
| a
|
||||||
| FILE_FLAG_OVERLAPPED
|
| FILE_FLAG_OVERLAPPED
|
||||||
| ((mode & no_cache) ? FILE_FLAG_WRITE_THROUGH : 0);
|
| ((mode & no_cache) ? FILE_FLAG_WRITE_THROUGH : 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue