From: Frédéric Marchal Date: Mon, 19 Jul 2010 07:18:08 +0000 (+0000) Subject: Report a warning if the temporary file cannot be deleted. X-Git-Tag: v2.3.1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=955d114311cdb5e6b8342d014d89fc7f8a0a371e;p=thirdparty%2Fsarg.git Report a warning if the temporary file cannot be deleted. --- diff --git a/denied.c b/denied.c index 99a624f..70a83e5 100644 --- a/denied.c +++ b/denied.c @@ -163,7 +163,8 @@ void gen_denied_report(void) if (fclose(fp_ou)<0) debuga(_("Failed to close file %s - %s\n"),report,strerror(errno)); - unlink(denied_in); + if (unlink(denied_in)==-1) + debuga(_("Failed to delete the file \"%s\" after processing it - %s\n"),denied_in,strerror(errno)); return; }