From: Frédéric Marchal Date: Sun, 15 Jul 2012 17:10:27 +0000 (+0200) Subject: Don't report an error when deleting the denied temporary file X-Git-Tag: v2.3.3~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5367038ab83e5927d295549c7fe603408ba1ef08;p=thirdparty%2Fsarg.git Don't report an error when deleting the denied temporary file The file can be deleted at two places. If the first call delete it, the second call must not report an error. --- diff --git a/log.c b/log.c index 7b20153..e1a9ade 100644 --- a/log.c +++ b/log.c @@ -1693,7 +1693,7 @@ int main(int argc,char *argv[]) gerarel(); if((ReportType & REPORT_TYPE_DENIED) != 0) { - if (!KeepTempLog && unlink(denied_sort)) + if (!KeepTempLog && unlink(denied_sort) && errno!=ENOENT) debuga(_("Cannot delete \"%s\": %s\n"),denied_sort,strerror(errno)); }