mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:15:59 +00:00
[SHELL32] Fix improperly formatted or missing disk letter in disk Properties. By Barrett Karish. CORE-9532
svn path=/trunk/; revision=67358
This commit is contained in:
parent
cf73294f5a
commit
45816784bb
1 changed files with 18 additions and 3 deletions
|
@ -137,12 +137,27 @@ SH_ShowDriveProperties(WCHAR *pwszDrive, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST
|
|||
{
|
||||
psh.pszCaption = wszName;
|
||||
psh.dwFlags |= PSH_PROPTITLE;
|
||||
pwszDrive[2] = 0;
|
||||
if (wszName[0] == UNICODE_NULL)
|
||||
{
|
||||
/* FIXME: check if disk is a really a local hdd */
|
||||
UINT i = LoadStringW(shell32_hInstance, IDS_DRIVE_FIXED, wszName, sizeof(wszName) / sizeof(WCHAR) - 6);
|
||||
StringCchPrintf(wszName + i, sizeof(wszName) / sizeof(WCHAR) - i, L" (%s)", pwszDrive);
|
||||
UINT len;
|
||||
switch (GetDriveTypeW(pwszDrive))
|
||||
{
|
||||
case DRIVE_CDROM:
|
||||
len = LoadStringW(shell32_hInstance, IDS_DRIVE_CDROM, wszName, _countof(wszName));
|
||||
break;
|
||||
case DRIVE_REMOTE:
|
||||
len = LoadStringW(shell32_hInstance, IDS_DRIVE_NETWORK, wszName, _countof(wszName));
|
||||
break;
|
||||
case DRIVE_FIXED:
|
||||
default:
|
||||
len = LoadStringW(shell32_hInstance, IDS_DRIVE_FIXED, wszName, _countof(wszName));
|
||||
break;
|
||||
}
|
||||
StringCchPrintf(wszName + len, _countof(wszName) - len, L" (%s)", pwszDrive);
|
||||
}
|
||||
else
|
||||
StringCchPrintf(wszName + wcslen(wszName), _countof(wszName) - wcslen(wszName), L" (%s)", pwszDrive);
|
||||
}
|
||||
|
||||
CComPtr<IDataObject> pDataObj;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue