Author: hbelusca Date: Sun Jul 3 23:58:37 2016 New Revision: 71805
URL: http://svn.reactos.org/svn/reactos?rev=71805&view=rev Log: [SHELL32]: Fix a regression I introduced in r71804.
Modified: trunk/reactos/dll/win32/shell32/wine/shpolicy.c
Modified: trunk/reactos/dll/win32/shell32/wine/shpolicy.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/shpo... ============================================================================== --- trunk/reactos/dll/win32/shell32/wine/shpolicy.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/wine/shpolicy.c [iso-8859-1] Sun Jul 3 23:58:37 2016 @@ -859,15 +859,18 @@ lstrcatA(regstr, p->appstr);
/* return 0 and don't set the cache if any registry errors occur */ +#ifndef __REACTOS__ retval = 0; -#ifndef __REACTOS__ if (RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey) == ERROR_SUCCESS) #else // FIXME: Actually this *MUST* use shlwapi!SHRestrictionLookup() // See http://www.geoffchappell.com/studies/windows/shell/shell32/api/util/shrestri... - retval = RegOpenKeyA(HKEY_LOCAL_MACHINE, regstr, &xhkey); + retval = RegOpenKeyA(HKEY_LOCAL_MACHINE, regstr, &xhkey); + if (retval != ERROR_SUCCESS) + { + retval = RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey); if (retval != ERROR_SUCCESS) - retval = RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey); - if (retval == ERROR_SUCCESS) + return 0; + } #endif { if (RegQueryValueExA(xhkey, p->keystr, NULL, NULL, (LPBYTE)&retval, &datsize) == ERROR_SUCCESS)