If the unixfs is rooted at the Desktop folder, forward
ParseDisplayName calls to it instead of to MyComputer.
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h
index 9dbc9b7..ea8383a 100644
--- a/dlls/shell32/shell32_main.h
+++ b/dlls/shell32/shell32_main.h
@@ -227,6 +227,7 @@
extern WCHAR swShell32Name[MAX_PATH];
+BOOL UNIXFS_is_rooted_at_desktop(void);
extern const GUID CLSID_UnixFolder;
extern const GUID CLSID_UnixDosFolder;
diff --git a/dlls/shell32/shfldr_desktop.c b/dlls/shell32/shfldr_desktop.c
index 9b564f8..8c05fa2 100644
--- a/dlls/shell32/shfldr_desktop.c
+++ b/dlls/shell32/shfldr_desktop.c
@@ -186,8 +186,11 @@
}
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))
diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index 6437c99..610f539 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -107,6 +107,36 @@
} 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]
*
* Checks for the first SHITEMID of an ITEMIDLIST if it passes a filter.