Home GnuPG
Diffusion GnuPG 3901c1a8c59a

gpg,w32: Fix gnupg_remove.

Description

gpg,w32: Fix gnupg_remove.

* common/sysutils.c (map_w32_to_errno): New.
(gnupg_w32_set_errno): New.
(gnupg_remove) [w32]: Set ERRNO

To support Unicode gnupg_remove was changed to use DeleteFileW and not
properly tested because the code was alreadt used in Windows CE.
However, ERRNO was not set and thus Dirmngr failed due to

if (!gnupg_remove (fname))

log_info (_("removed stale te[...] file '%s'\n"), fname);

else if (errno != ENOENT)

{
  err = gpg_error_from_syserror ();
  log_error (_("problem remov[...] file '%s': %s\n"),
             fname, gpg_strerror (err));
  goto leave;
}

(cherry picked from commit b6967d31912912ad3c0a2ff6bf6eb9822a194562)

Details

Provenance
wernerAuthored on Jan 11 2021, 2:19 PM
Parents
rGcf0f67199f42: speedo: Do not enable build timestamps.
Branches
Unknown
Tags
Unknown
Tasks
T5230: Delete file failure during CRL update