From 130eb54260add9e35b322f885d581f6d2c585f1c Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Tue, 4 Jun 2002 11:51:57 +0000 Subject: don't match directories --- soltools/mkdepend/include.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'soltools/mkdepend/include.c') diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c index e277382ecf12..337620c26cd3 100644 --- a/soltools/mkdepend/include.c +++ b/soltools/mkdepend/include.c @@ -63,7 +63,7 @@ struct inclist *inc_path(file, include, dot) * then check the exact path provided. */ if (!found && (dot || *include == '/')) { - if (stat(include, &st) == 0) { + if (stat(include, &st) == 0 && !( st.st_mode & S_IFDIR)) { ip = newinclude(include, include); found = TRUE; } @@ -87,7 +87,7 @@ struct inclist *inc_path(file, include, dot) strcpy(path + (p-file) + 1, include); } remove_dotdot(path); - if (stat(path, &st) == 0) { + if (stat(path, &st) == 0 && !( st.st_mode & S_IFDIR)) { ip = newinclude(path, include); found = TRUE; } @@ -103,7 +103,7 @@ struct inclist *inc_path(file, include, dot) for (pp = includedirs; *pp; pp++) { sprintf(path, "%s/%s", *pp, include); remove_dotdot(path); - if (stat(path, &st) == 0) { + if (stat(path, &st) == 0 && !(st.st_mode & S_IFDIR)) { ip = newinclude(path, include); found = TRUE; break; -- cgit