be less spammy if stat fails with ENOENT.

This commit is contained in:
Joris Vink 2018-07-28 22:27:38 +02:00
parent f126ba5a86
commit 43234cd36e
1 changed files with 4 additions and 2 deletions

View File

@ -99,8 +99,10 @@ kore_fileref_get(const char *path)
TAILQ_FOREACH(ref, &refs, list) {
if (!strcmp(ref->path, path)) {
if (stat(ref->path, &st) == -1) {
kore_log(LOG_ERR, "stat(%s): %s",
ref->path, errno_s);
if (errno != ENOENT) {
kore_log(LOG_ERR, "stat(%s): %s",
ref->path, errno_s);
}
fileref_soft_remove(ref);
return (NULL);
}