From ea7a05ad431527743688f485e3700ab321a05b52 Mon Sep 17 00:00:00 2001 From: Dominik Derigs Date: Wed, 22 Sep 2021 15:32:59 +0200 Subject: [PATCH] Correcly warn if dynamic directory is actually no directory Signed-off-by: DL6ER --- src/inotify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inotify.c b/src/inotify.c index 5776feb..7425b15 100644 --- a/src/inotify.c +++ b/src/inotify.c @@ -151,7 +151,7 @@ void set_dynamic_inotify(int flag, int total_size, struct crec **rhash, int revh if (stat(ah->fname, &buf) == -1 || !(S_ISDIR(buf.st_mode))) { my_syslog(LOG_ERR, _("bad dynamic directory %s: %s"), - ah->fname, strerror(errno)); + ah->fname, (S_ISDIR(buf.st_mode)) ? strerror(errno) : _("not a directory")); continue; }