mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01:00
common: Fix gnupg_access for older libgpg-error.
-- Fixes-commit: dd5fd4a760b8cf6ae05ff878bcf36cf2465e744c
This commit is contained in:
parent
5f8123df78
commit
56a77f57db
@ -1137,8 +1137,9 @@ gnupg_access (const char *name, int mode)
|
|||||||
#if GPGRT_VERSION_NUMBER < 0x012800 /* 1.40 */
|
#if GPGRT_VERSION_NUMBER < 0x012800 /* 1.40 */
|
||||||
# ifdef HAVE_W32_SYSTEM
|
# ifdef HAVE_W32_SYSTEM
|
||||||
wchar_t *wfname;
|
wchar_t *wfname;
|
||||||
|
gpg_err_code_t ec;
|
||||||
|
|
||||||
wfname = utf8_to_wchar (fname);
|
wfname = utf8_to_wchar (name);
|
||||||
if (!wfname)
|
if (!wfname)
|
||||||
ec = gpg_err_code_from_syserror ();
|
ec = gpg_err_code_from_syserror ();
|
||||||
else
|
else
|
||||||
@ -1146,6 +1147,7 @@ gnupg_access (const char *name, int mode)
|
|||||||
ec = _waccess (wfname, mode)? gpg_err_code_from_syserror () : 0;
|
ec = _waccess (wfname, mode)? gpg_err_code_from_syserror () : 0;
|
||||||
xfree (wfname);
|
xfree (wfname);
|
||||||
}
|
}
|
||||||
|
return ec;
|
||||||
# else
|
# else
|
||||||
return access (name, mode)? gpg_err_code_from_syserror () : 0;
|
return access (name, mode)? gpg_err_code_from_syserror () : 0;
|
||||||
# endif
|
# endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user