Author: hpoussin
Date: Fri Jun 23 00:50:53 2006
New Revision: 22509
URL:
http://svn.reactos.ru/svn/reactos?rev=22509&view=rev
Log:
Last 4 parameters of GetDiskFreeSpaceW are optional.
Fix bug 1608.
Modified:
trunk/reactos/dll/win32/kernel32/file/volume.c
Modified: trunk/reactos/dll/win32/kernel32/file/volume.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/kernel32/file/vol…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/volume.c (original)
+++ trunk/reactos/dll/win32/kernel32/file/volume.c Fri Jun 23 00:50:53 2006
@@ -256,10 +256,14 @@
return FALSE;
}
- *lpBytesPerSector = FileFsSize.BytesPerSector;
- *lpSectorsPerCluster = FileFsSize.SectorsPerAllocationUnit;
- *lpNumberOfFreeClusters = FileFsSize.AvailableAllocationUnits.u.LowPart;
- *lpTotalNumberOfClusters = FileFsSize.TotalAllocationUnits.u.LowPart;
+ if (lpSectorsPerCluster)
+ *lpSectorsPerCluster = FileFsSize.SectorsPerAllocationUnit;
+ if (lpBytesPerSector)
+ *lpBytesPerSector = FileFsSize.BytesPerSector;
+ if (lpNumberOfFreeClusters)
+ *lpNumberOfFreeClusters = FileFsSize.AvailableAllocationUnits.u.LowPart;
+ if (lpTotalNumberOfClusters)
+ *lpTotalNumberOfClusters = FileFsSize.TotalAllocationUnits.u.LowPart;
CloseHandle(hFile);
return TRUE;