diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c index 3e2616db303..2eb0a99ae8e 100644 --- a/dlls/shell32/shfldr_unixfs.c +++ b/dlls/shell32/shfldr_unixfs.c @@ -104,23 +104,19 @@ typedef struct _UnixFolder { */ BOOL UNIXFS_is_rooted_at_desktop(void) { HKEY hKey; - WCHAR *pwszCLSID_UnixDosFolder, wszRootedAtDesktop[69 + CHARS_IN_GUID] = { + WCHAR 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; + if (StringFromGUID2(&CLSID_UnixDosFolder, wszRootedAtDesktop + 69, CHARS_IN_GUID) && + RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszRootedAtDesktop, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + RegCloseKey(hKey); + return TRUE; + } + return FALSE; } /******************************************************************************