mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-10 21:38:50 +01:00
scd:w32: Fix for setting an environment block with GNUPGHOME.
* scd/app.c (report_change): It's ASCII or multi-byte encoded string. It's gpgrt's spawn function which converts it to wide char string internally if needed. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
c9677e9501
commit
412e183e55
@ -2483,9 +2483,8 @@ report_change (int slot, int old_status, int cur_status)
|
|||||||
|
|
||||||
homestr = make_filename (gnupg_homedir (), NULL);
|
homestr = make_filename (gnupg_homedir (), NULL);
|
||||||
#ifdef HAVE_W32_SYSTEM
|
#ifdef HAVE_W32_SYSTEM
|
||||||
/* An environment block is terminated by two/four zero bytes. It's
|
/* An environment block is terminated by two zero bytes. */
|
||||||
* four zero bytes for Unicode. Let us always use four zero bytes. */
|
if (gpgrt_asprintf (&envstr, "GNUPGHOME=%s%c", homestr, 0) < 0)
|
||||||
if (gpgrt_asprintf (&envstr, "GNUPGHOME=%s%c%c%c", homestr, 0, 0, 0) < 0)
|
|
||||||
#else
|
#else
|
||||||
if (gpgrt_asprintf (&envstr, "GNUPGHOME=%s", homestr) < 0)
|
if (gpgrt_asprintf (&envstr, "GNUPGHOME=%s", homestr) < 0)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user