mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 17:01:28 +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:
parent
e6b8a983ae
commit
7d4f528f60
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue