aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--agent/findkey.c5
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;