Correcly warn if dynamic directory is actually no directory

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
Dominik Derigs
2021-09-22 15:32:59 +02:00
committed by Simon Kelley
parent 26bbf5a314
commit ea7a05ad43

View File

@@ -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))) if (stat(ah->fname, &buf) == -1 || !(S_ISDIR(buf.st_mode)))
{ {
my_syslog(LOG_ERR, _("bad dynamic directory %s: %s"), 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; continue;
} }