Only initialize shell folders via the IPersistFolder3 interface in

SHELL32_CoCreateInitSF if the pidl which specifies the child is of
type 'Folder'. Otherwise fall back to IPersistFolder.
This commit is contained in:
Michael Jung 2005-07-20 10:29:05 +00:00 committed by Alexandre Julliard
parent 68709f1c41
commit 47c0906369
1 changed files with 3 additions and 1 deletions

View File

@ -204,7 +204,9 @@ HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCSTR pathRoot,
IPersistFolder *pPF;
IPersistFolder3 *ppf;
if (SUCCEEDED (IUnknown_QueryInterface ((IUnknown *) * ppvOut, &IID_IPersistFolder3, (LPVOID *) & ppf))) {
if (_ILIsFolder(pidlChild) &&
SUCCEEDED (IUnknown_QueryInterface ((IUnknown *) * ppvOut, &IID_IPersistFolder3, (LPVOID *) & ppf)))
{
PERSIST_FOLDER_TARGET_INFO ppfti;
char szDestPath[MAX_PATH];