Last 4 parameters of GetDiskFreeSpaceW are optional.

Fix bug 1608.

svn path=/trunk/; revision=22509
This commit is contained in:
Hervé Poussineau 2006-06-22 20:50:53 +00:00
parent 2e30a9b979
commit 26836826ef

View file

@ -256,9 +256,13 @@ GetDiskFreeSpaceW(
return FALSE; return FALSE;
} }
*lpBytesPerSector = FileFsSize.BytesPerSector; if (lpSectorsPerCluster)
*lpSectorsPerCluster = FileFsSize.SectorsPerAllocationUnit; *lpSectorsPerCluster = FileFsSize.SectorsPerAllocationUnit;
if (lpBytesPerSector)
*lpBytesPerSector = FileFsSize.BytesPerSector;
if (lpNumberOfFreeClusters)
*lpNumberOfFreeClusters = FileFsSize.AvailableAllocationUnits.u.LowPart; *lpNumberOfFreeClusters = FileFsSize.AvailableAllocationUnits.u.LowPart;
if (lpTotalNumberOfClusters)
*lpTotalNumberOfClusters = FileFsSize.TotalAllocationUnits.u.LowPart; *lpTotalNumberOfClusters = FileFsSize.TotalAllocationUnits.u.LowPart;
CloseHandle(hFile); CloseHandle(hFile);