summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 79226d1)
raw | patch | inline | side by side (parent: 79226d1)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Mon, 9 Jan 2012 18:01:50 +0000 (19:01 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 9 Jan 2012 18:06:54 +0000 (19:06 +0100) |
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>
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>
src/common.c | patch | blob | history |
diff --git a/src/common.c b/src/common.c
index d2a1b362429c4ffb5bf049437183b6b5ea328e48..530f73309327db8f0222acf2479e78799dfb8fcb 100644 (file)
--- a/src/common.c
+++ b/src/common.c
}
while (42) {
- if (stat (dir, &statbuf) == -1)
+ if ((stat (dir, &statbuf) == -1)
+ && (lstat (dir, &statbuf) == -1))
{
if (errno == ENOENT)
{