mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
[W32] Change location of /etc.
This commit is contained in:
parent
88fdd39749
commit
8e37ee4099
3
NEWS
3
NEWS
@ -9,6 +9,9 @@ Noteworthy changes in version 2.0.10 (unreleased)
|
|||||||
|
|
||||||
* [W32] Initialized the socket subsystem for all keyserver helpers.
|
* [W32] Initialized the socket subsystem for all keyserver helpers.
|
||||||
|
|
||||||
|
* [W32] The sysconf directory has been moved from a subdirectory of
|
||||||
|
the installation directory to %CSIDL_COMMON_APPDATA%/GNU/etc/gnupg.
|
||||||
|
|
||||||
* New gpg2 command --locate-keys.
|
* New gpg2 command --locate-keys.
|
||||||
|
|
||||||
* New gpg2 options --with-sig-list and --with-sig-check.
|
* New gpg2 options --with-sig-list and --with-sig-check.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2008-06-16 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* homedir.c (w32_commondir): New.
|
||||||
|
(gnupg_sysconfdir): Use it.
|
||||||
|
|
||||||
2008-06-09 Werner Koch <wk@g10code.com>
|
2008-06-09 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* b64dec.c: New.
|
* b64dec.c: New.
|
||||||
|
@ -197,6 +197,35 @@ w32_rootdir (void)
|
|||||||
/* Fallback to the hardwired value. */
|
/* Fallback to the hardwired value. */
|
||||||
return GNUPG_LIBEXECDIR;
|
return GNUPG_LIBEXECDIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
w32_commondir (void)
|
||||||
|
{
|
||||||
|
static char *dir;
|
||||||
|
|
||||||
|
if (!dir)
|
||||||
|
{
|
||||||
|
char path[MAX_PATH];
|
||||||
|
|
||||||
|
if (w32_shgetfolderpath (NULL, CSIDL_COMMON_APPDATA,
|
||||||
|
NULL, 0, path) >= 0)
|
||||||
|
{
|
||||||
|
char *tmp = xmalloc (strlen (path) + 4 +1);
|
||||||
|
strcpy (stpcpy (tmp, path), "\\GNU");
|
||||||
|
dir = tmp;
|
||||||
|
/* No auto create of the directory. Either the installer or
|
||||||
|
the admin has to create these directories. */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Ooops: Not defined - probably an old Windows version.
|
||||||
|
Use the installation directory instead. */
|
||||||
|
dir = xstrdup (w32_rootdir ());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return dir;
|
||||||
|
}
|
||||||
#endif /*HAVE_W32_SYSTEM*/
|
#endif /*HAVE_W32_SYSTEM*/
|
||||||
|
|
||||||
|
|
||||||
@ -214,7 +243,7 @@ gnupg_sysconfdir (void)
|
|||||||
if (!name)
|
if (!name)
|
||||||
{
|
{
|
||||||
const char *s1, *s2;
|
const char *s1, *s2;
|
||||||
s1 = w32_rootdir ();
|
s1 = w32_commondir ();
|
||||||
s2 = DIRSEP_S "etc" DIRSEP_S "gnupg";
|
s2 = DIRSEP_S "etc" DIRSEP_S "gnupg";
|
||||||
name = xmalloc (strlen (s1) + strlen (s2) + 1);
|
name = xmalloc (strlen (s1) + strlen (s2) + 1);
|
||||||
strcpy (stpcpy (name, s1), s2);
|
strcpy (stpcpy (name, s1), s2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user