* environ.cc (regopt): Scan HKLM if HKCU scan fails.

This commit is contained in:
Christopher Faylor 2000-05-22 21:19:36 +00:00
parent 6892216822
commit 9e1ab0ca55
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Mon May 22 17:11:25 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc (regopt): Scan HKLM if HKCU scan fails.
Mon May 16 23:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
* dir.cc (rmdir): Care for misleading error messages

View File

@ -433,6 +433,12 @@ regopt (const char *name)
MALLOC_CHECK;
if (r.get_string (lname, buf, sizeof (buf) - 1, "") == ERROR_SUCCESS)
parse_options (buf);
else
{
reg_key r1 (HKEY_LOCAL_MACHINE, KEY_READ, CYGWIN_INFO_PROGRAM_OPTIONS_NAME, NULL);
if (r1.get_string (lname, buf, sizeof (buf) - 1, "") == ERROR_SUCCESS)
parse_options (buf);
}
MALLOC_CHECK;
}