Author: gadamopoulos
Date: Sun Sep 27 15:09:28 2015
New Revision: 69374

URL: http://svn.reactos.org/svn/reactos?rev=69374&view=rev
Log:
[SHELL32]
- Fix for drive free/total space in My Computer. Patch by Barrett Karish.
CORE-10264

Modified:
    trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp

Modified: trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp?rev=69374&r1=69373&r2=69374&view=diff
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp   [iso-8859-1] 
(original)
+++ trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp   [iso-8859-1] 
Sun Sep 27 15:09:28 2015
@@ -669,21 +669,26 @@
         switch (iColumn)
         {
             case 0:        /* name */
-                hr = GetDisplayNameOf(pidl,
-                                      SHGDN_NORMAL | SHGDN_INFOLDER, 
&psd->str);
+                hr = GetDisplayNameOf(pidl, SHGDN_NORMAL | SHGDN_INFOLDER, 
&psd->str);
                 break;
             case 1:        /* type */
                 _ILGetFileType(pidl, psd->str.cStr, MAX_PATH);
                 break;
             case 2:        /* total size */
                 _ILSimpleGetText (pidl, szPath, MAX_PATH);
-                GetDiskFreeSpaceExA (szPath, NULL, &ulBytes, NULL);
-                StrFormatByteSize64A (ulBytes.QuadPart, psd->str.cStr, 
MAX_PATH);
+                if (GetVolumeInformationA(szPath, NULL, 0, NULL, NULL, NULL, 
NULL, 0))
+                {
+                    GetDiskFreeSpaceExA(szPath, NULL, &ulBytes, NULL);
+                    StrFormatByteSize64A(ulBytes.QuadPart, psd->str.cStr, 
MAX_PATH);
+                }
                 break;
             case 3:        /* free size */
                 _ILSimpleGetText (pidl, szPath, MAX_PATH);
-                GetDiskFreeSpaceExA (szPath, &ulBytes, NULL, NULL);
-                StrFormatByteSize64A (ulBytes.QuadPart, psd->str.cStr, 
MAX_PATH);
+                if (GetVolumeInformationA(szPath, NULL, 0, NULL, NULL, NULL, 
NULL, 0))
+                {
+                    GetDiskFreeSpaceExA(szPath, &ulBytes, NULL, NULL);
+                    StrFormatByteSize64A(ulBytes.QuadPart, psd->str.cStr, 
MAX_PATH);
+                }
                 break;
         }
         hr = S_OK;


Reply via email to