aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-10-26 09:19:58 +0000
committerWerner Koch <[email protected]>2020-10-26 11:35:28 +0000
commit56a77f57db90171a1437b1e2cb1211d0a34d688a (patch)
tree6b08c1ff6975da30ffd813f01bb8e617f2d0caed
parentcommon: New functions gnupg_opendir et al. (diff)
downloadgnupg-56a77f57db90171a1437b1e2cb1211d0a34d688a.tar.gz
gnupg-56a77f57db90171a1437b1e2cb1211d0a34d688a.zip
common: Fix gnupg_access for older libgpg-error.
-- Fixes-commit: dd5fd4a760b8cf6ae05ff878bcf36cf2465e744c
-rw-r--r--common/sysutils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/sysutils.c b/common/sysutils.c
index acfea7db6..05fadb3d7 100644
--- a/common/sysutils.c
+++ b/common/sysutils.c
@@ -1137,8 +1137,9 @@ gnupg_access (const char *name, int mode)
#if GPGRT_VERSION_NUMBER < 0x012800 /* 1.40 */
# ifdef HAVE_W32_SYSTEM
wchar_t *wfname;
+ gpg_err_code_t ec;
- wfname = utf8_to_wchar (fname);
+ wfname = utf8_to_wchar (name);
if (!wfname)
ec = gpg_err_code_from_syserror ();
else
@@ -1146,6 +1147,7 @@ gnupg_access (const char *name, int mode)
ec = _waccess (wfname, mode)? gpg_err_code_from_syserror () : 0;
xfree (wfname);
}
+ return ec;
# else
return access (name, mode)? gpg_err_code_from_syserror () : 0;
# endif