mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
common,w32: Sync read_w32_registry_string with the gpgrt version
* common/w32-reg.c (get_root_key): Add short version of the root classes. -- The code here is only used by gpgconf's new --show-configs command. Usually on Windows the code from gpgrt is used for reading the registry. This one here is an exception and when backporting it I missed to add the HKCU etc al string. Fixes-commit: 6c6c404883e52545ed38293384c95fdacb7227c4 GnuPG-bug-id: 5724
This commit is contained in:
parent
14de7b1e59
commit
1af559a9a2
@ -54,17 +54,17 @@ get_root_key(const char *root)
|
|||||||
|
|
||||||
if (!root)
|
if (!root)
|
||||||
root_key = HKEY_CURRENT_USER;
|
root_key = HKEY_CURRENT_USER;
|
||||||
else if (!strcmp( root, "HKEY_CLASSES_ROOT" ) )
|
else if (!strcmp (root, "HKEY_CLASSES_ROOT") || !strcmp (root, "HKCR"))
|
||||||
root_key = HKEY_CLASSES_ROOT;
|
root_key = HKEY_CLASSES_ROOT;
|
||||||
else if (!strcmp( root, "HKEY_CURRENT_USER" ) )
|
else if (!strcmp (root, "HKEY_CURRENT_USER") || !strcmp (root, "HKCU"))
|
||||||
root_key = HKEY_CURRENT_USER;
|
root_key = HKEY_CURRENT_USER;
|
||||||
else if (!strcmp( root, "HKEY_LOCAL_MACHINE" ) )
|
else if (!strcmp (root, "HKEY_LOCAL_MACHINE") || !strcmp (root, "HKLM"))
|
||||||
root_key = HKEY_LOCAL_MACHINE;
|
root_key = HKEY_LOCAL_MACHINE;
|
||||||
else if (!strcmp( root, "HKEY_USERS" ) )
|
else if (!strcmp (root, "HKEY_USERS") || !strcmp (root, "HKU"))
|
||||||
root_key = HKEY_USERS;
|
root_key = HKEY_USERS;
|
||||||
else if (!strcmp( root, "HKEY_PERFORMANCE_DATA" ) )
|
else if (!strcmp (root, "HKEY_PERFORMANCE_DATA"))
|
||||||
root_key = HKEY_PERFORMANCE_DATA;
|
root_key = HKEY_PERFORMANCE_DATA;
|
||||||
else if (!strcmp( root, "HKEY_CURRENT_CONFIG" ) )
|
else if (!strcmp (root, "HKEY_CURRENT_CONFIG") || !strcmp (root, "HKCC"))
|
||||||
root_key = HKEY_CURRENT_CONFIG;
|
root_key = HKEY_CURRENT_CONFIG;
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user