don't log failure if unlinking fails with ENOENT

This commit is contained in:
Joris Vink 2017-02-22 17:52:38 +01:00
parent fc6b3bf740
commit 2f670ce777
1 changed files with 1 additions and 1 deletions

View File

@ -537,7 +537,7 @@ http_request_free(struct http_request *req)
(void)close(req->http_body_fd);
if (req->http_body_path != NULL) {
if (unlink(req->http_body_path) == -1) {
if (unlink(req->http_body_path) == -1 && errno != ENOENT) {
kore_log(LOG_NOTICE, "failed to unlink %s: %s",
req->http_body_path, errno_s);
}