Author: janderwald
Date: Fri Oct 31 13:48:15 2008
New Revision: 37112
URL:
http://svn.reactos.org/svn/reactos?rev=37112&view=rev
Log:
- Display drive details for CDROMs
- Fix a bug in the free space calculation
Modified:
trunk/reactos/dll/win32/shell32/drive.c
Modified: trunk/reactos/dll/win32/shell32/drive.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/drive.c?…
==============================================================================
--- trunk/reactos/dll/win32/shell32/drive.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/drive.c [iso-8859-1] Fri Oct 31 13:48:15 2008
@@ -295,6 +295,11 @@
GetFreeBytesShare(LARGE_INTEGER TotalNumberOfFreeBytes, LARGE_INTEGER
TotalNumberOfBytes)
{
LARGE_INTEGER Temp, Result, Remainder;
+
+ if (TotalNumberOfFreeBytes.QuadPart == 0LL)
+ {
+ return ConvertUlongToLargeInteger(0);
+ }
Temp = LargeIntegerDivide(TotalNumberOfBytes, ConvertUlongToLargeInteger(100),
&Remainder);
if (Temp.QuadPart >= TotalNumberOfFreeBytes.QuadPart)
@@ -388,7 +393,7 @@
}
DriveType = GetDriveTypeW(szDrive);
- if (DriveType == DRIVE_FIXED)
+ if (DriveType == DRIVE_FIXED || DriveType == DRIVE_CDROM)
{
if(GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable,
(PULARGE_INTEGER)&TotalNumberOfBytes, (PULARGE_INTEGER)&TotalNumberOfFreeBytes))