Commit db7a3a35 authored by Michael Jung's avatar Michael Jung Committed by Alexandre Julliard

shell32: Support for CLSID_ShellFSFolder in unixfs.

parent 624efed7
......@@ -96,6 +96,7 @@ HRESULT WINAPI UnixFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID
HRESULT WINAPI UnixDosFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
HRESULT WINAPI FolderShortcut_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
HRESULT WINAPI MyDocuments_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
HRESULT WINAPI ShellFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
extern HRESULT CPanel_GetIconLocationW(LPITEMIDLIST, LPWSTR, UINT, int*);
HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
......
......@@ -1494,13 +1494,21 @@ static HRESULT WINAPI UnixFolder_IPersistFolder3_Initialize(IPersistFolder3* ifa
/* Find the UnixFolderClass root */
while (current->mkid.cb) {
if (_ILIsSpecialFolder(current) && IsEqualIID(This->m_pCLSID, _ILGetGUIDPointer(current)))
if ((_ILIsDrive(current) && IsEqualCLSID(This->m_pCLSID, &CLSID_ShellFSFolder)) ||
(_ILIsSpecialFolder(current) && IsEqualCLSID(This->m_pCLSID, _ILGetGUIDPointer(current))))
{
break;
}
current = ILGetNext(current);
}
if (current && current->mkid.cb) {
if (IsEqualIID(&CLSID_MyDocuments, _ILGetGUIDPointer(current))) {
if (_ILIsDrive(current)) {
WCHAR wszDrive[4] = { '?', ':', '\\', 0 };
wszDrive[0] = (WCHAR)*_ILGetTextPointer(current);
if (!UNIXFS_get_unix_path(wszDrive, szBasePath))
return E_FAIL;
} else if (IsEqualIID(&CLSID_MyDocuments, _ILGetGUIDPointer(current))) {
WCHAR wszMyDocumentsPath[MAX_PATH];
if (!SHGetSpecialFolderPathW(0, wszMyDocumentsPath, CSIDL_PERSONAL, FALSE))
return E_FAIL;
......@@ -2122,6 +2130,11 @@ HRESULT WINAPI MyDocuments_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID
return CreateUnixFolder(pUnkOuter, riid, ppv, &CLSID_MyDocuments);
}
HRESULT WINAPI ShellFSFolder_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) {
TRACE("(pUnkOuter=%p, riid=%p, ppv=%p)\n", pUnkOuter, riid, ppv);
return CreateUnixFolder(pUnkOuter, riid, ppv, &CLSID_ShellFSFolder);
}
/******************************************************************************
* UnixSubFolderIterator
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment