Previously, the following situation would cause an endless look (as reported
by Michael Prokop in Debian bug #619123): the (CSV or RRD) datadir is a
symlink pointing to a non-existent target.
With this patch applied, check_create_dir() fails with "<file> exists but is
not a directory".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
}
while (42) {
- if (stat (dir, &statbuf) == -1)
+ if ((stat (dir, &statbuf) == -1)
+ && (lstat (dir, &statbuf) == -1))
{
if (errno == ENOENT)
{