mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 12:23:30 +00:00
[SHELL32]
- Fix for drive free/total space in My Computer. Patch by Barrett Karish. CORE-10264 svn path=/trunk/; revision=69374
This commit is contained in:
@@ -669,21 +669,26 @@ HRESULT WINAPI CDrivesFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, S
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user