Merge branch 'sigar-1.6'

This commit is contained in:
Doug MacEachern 2010-04-01 16:44:31 -07:00
commit 600d4d5523
1 changed files with 7 additions and 2 deletions

View File

@ -381,9 +381,14 @@ static int fileattrs_get(sigar_t *sigar,
FILE_FLAG_BACKUP_SEMANTICS : FILE_FLAG_BACKUP_SEMANTICS :
FILE_ATTRIBUTE_NORMAL; FILE_ATTRIBUTE_NORMAL;
/**
* We need to set dwDesiredAccess to 0 to work in cases where GENERIC_READ can fail.
*
* see: http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx
*/
handle = CreateFile(file, handle = CreateFile(file,
GENERIC_READ, 0,
FILE_SHARE_READ, 0,
NULL, NULL,
OPEN_EXISTING, OPEN_EXISTING,
flags, flags,