[SHELL32]

- When binding to a drive item try to initialize the new CFSFolder using IPersistFolder3. That allows us to get the path of the drive right from the pidl instead of getting a new reference to the CDrivesFolder and using GetDisplayNameOf for the pidl.

svn path=/trunk/; revision=68865
This commit is contained in:
Giannis Adamopoulos 2015-08-29 21:09:29 +00:00
parent 90143b555c
commit af3114c491

View file

@ -163,7 +163,7 @@ static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot,
CComPtr<IPersistFolder> ppf;
CComPtr<IPersistFolder3> ppf3;
if (_ILIsFolder(pidlChild) &&
if ((_ILIsFolder(pidlChild) || _ILIsDrive(pidlChild)) &&
SUCCEEDED(pShellFolder->QueryInterface(IID_PPV_ARG(IPersistFolder3, &ppf3))))
{
PERSIST_FOLDER_TARGET_INFO ppfti;