diff options
author | Werner Koch <[email protected]> | 2020-10-26 09:19:58 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-10-26 11:35:28 +0000 |
commit | 56a77f57db90171a1437b1e2cb1211d0a34d688a (patch) | |
tree | 6b08c1ff6975da30ffd813f01bb8e617f2d0caed | |
parent | common: New functions gnupg_opendir et al. (diff) | |
download | gnupg-56a77f57db90171a1437b1e2cb1211d0a34d688a.tar.gz gnupg-56a77f57db90171a1437b1e2cb1211d0a34d688a.zip |
common: Fix gnupg_access for older libgpg-error.
--
Fixes-commit: dd5fd4a760b8cf6ae05ff878bcf36cf2465e744c
-rw-r--r-- | common/sysutils.c | 4 |
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 |