forked from Mirrors/wine-wine
If the unixfs is rooted at the Desktop folder, forward
ParseDisplayName calls to it instead of to MyComputer.oldstable
parent
cafb57383d
commit
9393580ab5
|
@ -227,6 +227,7 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation,
|
|||
|
||||
extern WCHAR swShell32Name[MAX_PATH];
|
||||
|
||||
BOOL UNIXFS_is_rooted_at_desktop(void);
|
||||
extern const GUID CLSID_UnixFolder;
|
||||
extern const GUID CLSID_UnixDosFolder;
|
||||
|
||||
|
|
|
@ -186,8 +186,11 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
|
|||
}
|
||||
else if (PathGetDriveNumberW (lpszDisplayName) >= 0)
|
||||
{
|
||||
/* it's a filesystem path with a drive. Let MyComputer parse it */
|
||||
pidlTemp = _ILCreateMyComputer ();
|
||||
/* it's a filesystem path with a drive. Let MyComputer/UnixDosFolder parse it */
|
||||
if (UNIXFS_is_rooted_at_desktop())
|
||||
pidlTemp = _ILCreateGuid(PT_GUID, &CLSID_UnixDosFolder);
|
||||
else
|
||||
pidlTemp = _ILCreateMyComputer ();
|
||||
szNext = lpszDisplayName;
|
||||
}
|
||||
else if (PathIsUNCW(lpszDisplayName))
|
||||
|
|
|
@ -106,6 +106,36 @@ typedef struct _UnixFolder {
|
|||
DWORD m_dwPathMode;
|
||||
} UnixFolder;
|
||||
|
||||
/******************************************************************************
|
||||
* UNIXFS_is_rooted_at_desktop [Internal]
|
||||
*
|
||||
* Checks if the unixfs namespace extension is rooted at desktop level.
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE, if unixfs is rooted at desktop level
|
||||
* FALSE, if not.
|
||||
*/
|
||||
BOOL UNIXFS_is_rooted_at_desktop(void) {
|
||||
HKEY hKey;
|
||||
WCHAR *pwszCLSID_UnixDosFolder, wszRootedAtDesktop[69 + CHARS_IN_GUID] = {
|
||||
'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
|
||||
'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
|
||||
'E','x','p','l','o','r','e','r','\\','D','e','s','k','t','o','p','\\',
|
||||
'N','a','m','e','S','p','a','c','e','\\',0 };
|
||||
|
||||
if (FAILED(StringFromCLSID(&CLSID_UnixDosFolder, &pwszCLSID_UnixDosFolder)))
|
||||
return FALSE;
|
||||
|
||||
lstrcatW(wszRootedAtDesktop, pwszCLSID_UnixDosFolder);
|
||||
CoTaskMemFree(pwszCLSID_UnixDosFolder);
|
||||
|
||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszRootedAtDesktop, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
RegCloseKey(hKey);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* UNIXFS_is_pidl_of_type [INTERNAL]
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue