From: Frédéric Marchal Date: Sun, 9 Sep 2012 13:44:26 +0000 (+0200) Subject: Overwrite any existing dansguardian temporary file X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c99c403c1bfadb707bd9ee7f20eef6b6eda0e4c1;p=thirdparty%2Fsarg.git 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. --- 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); }