diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/ChangeLog | 4 | ||||
-rw-r--r-- | common/homedir.c | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/common/ChangeLog b/common/ChangeLog index 9db29d908..d398d2a77 100644 --- a/common/ChangeLog +++ b/common/ChangeLog @@ -1,3 +1,7 @@ +2007-11-27 Werner Koch <[email protected]> + + * homedir.c (dirmngr_socket_name): Use CSIDL_WINDOWS. + 2007-11-15 Werner Koch <[email protected]> * asshelp.c (send_pinentry_environment): Add args XAUTHORITY and diff --git a/common/homedir.c b/common/homedir.c index b85f760a0..6f1b49c21 100644 --- a/common/homedir.c +++ b/common/homedir.c @@ -299,8 +299,13 @@ dirmngr_socket_name (void) if (!name) { - const char *s1, *s2; - s1 = w32_rootdir (); + char s1[MAX_PATH]; + const char *s2; + + /* We need something akin CSIDL_COMMON_PROGRAMS, but local + (non-roaming). */ + if (w32_shgetfolderpath (NULL, CSIDL_WINDOWS, NULL, 0, s1) < 0) + strcpy (s1, "C:\\WINDOWS"); s2 = DIRSEP_S "S.dirmngr"; name = xmalloc (strlen (s1) + strlen (s2) + 1); strcpy (stpcpy (name, s1), s2); |