diff options
| author | Werner Koch <[email protected]> | 2025-10-21 07:20:25 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2025-10-21 07:20:25 +0000 |
| commit | 2b54dd035a32c78e9a5eca56add576a0c33a0532 (patch) | |
| tree | 8703437577c26e82bd062fefbfac0a1e1f17c529 | |
| parent | common: Reformat some comments in iobuf.c (diff) | |
| download | gnupg-2b54dd035a32c78e9a5eca56add576a0c33a0532.tar.gz gnupg-2b54dd035a32c78e9a5eca56add576a0c33a0532.zip | |
w32: When deleting a private key retry up to 400ms.
* agent/findkey.c (remove_key_file): Wait if needed
--
This might also help in case of
GnuPG-bug-id: 7863
| -rw-r--r-- | agent/findkey.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/agent/findkey.c b/agent/findkey.c index 5ffed6ae1..4ca83bce4 100644 --- a/agent/findkey.c +++ b/agent/findkey.c @@ -1210,7 +1210,10 @@ remove_key_file (const unsigned char *grip) { return gpg_error_from_syserror (); } - if (gnupg_remove (fname)) + /* On Windows we wait up to 400ms until a sharing violation has + * vanished. This may for example happen if Kleopatra or another + * frontend directly reads a private key file. */ + if (gnupg_remove_ext (fname, 400)) err = gpg_error_from_syserror (); xfree (fname); return err; |
