diff options
| author | Werner Koch <[email protected]> | 2021-08-11 09:50:41 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2021-08-11 09:50:41 +0000 |
| commit | 0802cbb59b21e06e16b4fd8596934c5565e7f659 (patch) | |
| tree | 0324ec2002a7c46a182aaa2d94c0bf4d3023e9a5 /tools/gpgconf.c | |
| parent | gpgconf,w32: Print more registry diagnostics with --list-dirs. (diff) | |
| download | gnupg-0802cbb59b21e06e16b4fd8596934c5565e7f659.tar.gz gnupg-0802cbb59b21e06e16b4fd8596934c5565e7f659.zip | |
w32: Move socketdir to LCOAL_APPDATA
* common/homedir.c (is_gnupg_default_homedir): Use standard_homedir
instead of the constant which makes a difference on Windows.
(_gnupg_socketdir_internal) [W32]: Move the directory to LOCAL_APPDATA.
(gnupg_cachedir): Remove unsued function.
* common/sysutils.c (gnupg_rmdir): New.
* tools/gpgconf.c (main): s/rmdir/gnupg_rmdir/.
--
That is actually a more correct directory than APPDATA. This fixes
a problem with installations where the APPDATA is non a network drive
and the resulting socket filename is truncated in our socket helper
function (because we use sockaddr also for our local socket
emulation on Windows).
LOCAL_APPDATA is expected to be on the local box and thus in the
majority of cases the resulting socket file name will be short enough.
GnuPG-bug-id: 5537
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tools/gpgconf.c')
| -rw-r--r-- | tools/gpgconf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c index b4ffa1ab8..1a99c9844 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -925,7 +925,7 @@ main (int argc, char **argv) log_info ("ignoring request to remove non /run/user socket dir\n"); else if (opt.dry_run) ; - else if (rmdir (socketdir)) + else if (gnupg_rmdir (socketdir)) { /* If the director is not empty we first try to delete * socket files. */ @@ -952,7 +952,7 @@ main (int argc, char **argv) gnupg_remove (p); xfree (p); } - if (rmdir (socketdir)) + if (gnupg_rmdir (socketdir)) gc_error (1, 0, "error removing '%s': %s", socketdir, gpg_strerror (err)); } |
