GnuPG 2.1 not reading from Windows registry

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

GnuPG 2.1 not reading from Windows registry

Alexander Strobel
There seems to be a problem in GnuPG 2.1.x when reading from the Windows

The default_homedir() function in "homedir.c" uses the following code to
read from the registry:
tmp = read_w32_registry_string (NULL,

GNUPG_REGISTRY_DIR is defined with leading back slashes.
If you remove the leading back slashes passed to
read_w32_registry_string the correct value is returned.

There is a thread describes problems with leading back slashes:!topic/

> For RegCreateKeyEx, the documentation says:
> The subkey name specified by lpSubKey must not begin with the backslash
> character ('\'). If it does, ERROR_BAD_PATHNAME is returned.
> Windows Me/98/95:  Beginning backslash characters in the subkey name
> specified by lpSubKey are ignored.
> I think, the same requirement applies to RegOpenKeyEx, even though
it's not
> mentioned.

Best regards
Alex Strobel

Gnupg-devel mailing list
[hidden email]