shell32: Fix getting a command string when root key default value doesn't point to a key.
This commit is contained in:
parent
6b4f43e8e6
commit
8ae6b43bc8
@ -263,17 +263,19 @@ static HRESULT ASSOC_GetCommand(IQueryAssociationsImpl *This, const WCHAR *extra
|
|||||||
|
|
||||||
ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, filetype, 0, KEY_READ, &hkeyFile);
|
ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, filetype, 0, KEY_READ, &hkeyFile);
|
||||||
HeapFree(GetProcessHeap(), 0, filetype);
|
HeapFree(GetProcessHeap(), 0, filetype);
|
||||||
if (ret) return HRESULT_FROM_WIN32(ret);
|
|
||||||
|
|
||||||
ret = RegOpenKeyExW(hkeyFile, shellW, 0, KEY_READ, &hkeyShell);
|
if (ret == ERROR_SUCCESS)
|
||||||
RegCloseKey(hkeyFile);
|
{
|
||||||
if (ret) return HRESULT_FROM_WIN32(ret);
|
ret = RegOpenKeyExW(hkeyFile, shellW, 0, KEY_READ, &hkeyShell);
|
||||||
|
RegCloseKey(hkeyFile);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ret = RegOpenKeyExW(This->hkeySource, shellW, 0, KEY_READ, &hkeyShell);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
ret = RegOpenKeyExW(This->hkeySource, shellW, 0, KEY_READ, &hkeyShell);
|
ret = RegOpenKeyExW(This->hkeySource, shellW, 0, KEY_READ, &hkeyShell);
|
||||||
if (ret) return HRESULT_FROM_WIN32(ret);
|
|
||||||
}
|
if (ret) return HRESULT_FROM_WIN32(ret);
|
||||||
|
|
||||||
if (!extra)
|
if (!extra)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user