From c99c403c1bfadb707bd9ee7f20eef6b6eda0e4c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Sun, 9 Sep 2012 15:44:26 +0200 Subject: [PATCH] Overwrite any existing dansguardian temporary file When sarg parses a dansguardian log, the temporary file to store the parsed value is overwritten if it exists instead of appending the entries at the end of any left over from a previous run. --- dansguardian_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dansguardian_log.c b/dansguardian_log.c index 3701a79..874fa06 100644 --- a/dansguardian_log.c +++ b/dansguardian_log.c @@ -62,7 +62,7 @@ void dansguardian_log(void) exit(EXIT_FAILURE); } - if((fp_ou=MY_FOPEN(guard_in,"a"))==NULL) { + if((fp_ou=MY_FOPEN(guard_in,"w"))==NULL) { debuga(_("(dansguardian) Cannot open log file %s: %s\n"),guard_in,strerror(errno)); exit(EXIT_FAILURE); } -- 2.47.3