summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/x-authority.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/x-authority.c b/src/x-authority.c
index baaf4bea..a04f76a6 100644
--- a/src/x-authority.c
+++ b/src/x-authority.c
@@ -320,7 +320,7 @@ x_authority_write (XAuthority *auth, XAuthWriteMode mode, const gchar *filename,
/* Write records back */
errno = 0;
- int output_fd = g_open (filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
+ int output_fd = g_open (filename, O_WRONLY | O_CREAT | O_TRUNC , S_IRUSR | S_IWUSR);
if (output_fd < 0)
{
g_set_error (error,