From: Frédéric Marchal Date: Sat, 18 Sep 2010 12:33:37 +0000 (+0000) Subject: Report a warning if the temporary file cannot be deleted. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0cc74899ae8c61fa8989b838a54a93ad73bb710e;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; }