summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--g10/keydb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/keydb.c b/g10/keydb.c
index e49e25fd9..b959f0521 100644
--- a/g10/keydb.c
+++ b/g10/keydb.c
@@ -415,7 +415,7 @@ maybe_create_keyring_or_box (char *filename, int is_box, int force_create)
that the detection magic will work the next time it is used. */
if (is_box)
{
- FILE *fp = fopen (filename, "w");
+ FILE *fp = fopen (filename, "wb");
if (!fp)
rc = gpg_error_from_syserror ();
else