* 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

@@ -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;
}