fix hidden attribute in file class

This commit is contained in:
arvidn 2018-05-22 09:29:54 +02:00 committed by Arvid Norberg
parent ed8fffc1a6
commit 77191a3820
1 changed files with 2 additions and 2 deletions

View File

@ -1419,14 +1419,14 @@ namespace libtorrent
TORRENT_ASSERT((mode & rw_mask) < sizeof(mode_array)/sizeof(mode_array[0]));
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
// turns out that it isn't. That flag will break your operating system:
// http://support.microsoft.com/kb/2549369
DWORD flags = ((mode & random_access) ? 0 : FILE_FLAG_SEQUENTIAL_SCAN)
| (a ? a : FILE_ATTRIBUTE_NORMAL)
| a
| FILE_FLAG_OVERLAPPED
| ((mode & no_cache) ? FILE_FLAG_WRITE_THROUGH : 0);