Commit 8ae6b43b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

shell32: Fix getting a command string when root key default value doesn't point to a key.

parent 6b4f43e8
......@@ -263,17 +263,19 @@ static HRESULT ASSOC_GetCommand(IQueryAssociationsImpl *This, const WCHAR *extra
ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, filetype, 0, KEY_READ, &hkeyFile);
HeapFree(GetProcessHeap(), 0, filetype);
if (ret) return HRESULT_FROM_WIN32(ret);
ret = RegOpenKeyExW(hkeyFile, shellW, 0, KEY_READ, &hkeyShell);
RegCloseKey(hkeyFile);
if (ret) return HRESULT_FROM_WIN32(ret);
if (ret == ERROR_SUCCESS)
{
ret = RegOpenKeyExW(hkeyFile, shellW, 0, KEY_READ, &hkeyShell);
RegCloseKey(hkeyFile);
}
else
ret = RegOpenKeyExW(This->hkeySource, shellW, 0, KEY_READ, &hkeyShell);
}
else
{
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)
{
......
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