Blame SOURCES/cscope-3-Avoid-putting-directories-found-during-header-search.patch
|
|
37d6e3 |
From f693474b85f8dc1d31570833c62d9210ed1ffcf2 Mon Sep 17 00:00:00 2001
|
|
|
37d6e3 |
From: mikhail nefedov <mnefedov@users.sourceforge.net>
|
|
|
37d6e3 |
Date: Thu, 23 Aug 2018 00:36:52 +0200
|
|
|
37d6e3 |
Subject: [PATCH 4/9] Avoid putting directories found during header search into
|
|
|
37d6e3 |
srcfiles.
|
|
|
37d6e3 |
|
|
|
37d6e3 |
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
|
|
|
37d6e3 |
---
|
|
|
37d6e3 |
src/dir.c | 7 +++++--
|
|
|
37d6e3 |
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
37d6e3 |
|
|
|
37d6e3 |
diff --git a/src/dir.c b/src/dir.c
|
|
|
37d6e3 |
index 01c599e..7f7287e 100644
|
|
|
37d6e3 |
--- a/src/dir.c
|
|
|
37d6e3 |
+++ b/src/dir.c
|
|
|
37d6e3 |
@@ -616,8 +616,11 @@ incfile(char *file, char *type)
|
|
|
37d6e3 |
snprintf(path, sizeof(path), "%.*s/%s",
|
|
|
37d6e3 |
(int)(PATHLEN - 2 - file_len), incdirs[i],
|
|
|
37d6e3 |
file);
|
|
|
37d6e3 |
- if (access(compath(path), READ) == 0) {
|
|
|
37d6e3 |
- addsrcfile(path);
|
|
|
37d6e3 |
+ if (access(compath(path), READ) == 0) {
|
|
|
37d6e3 |
+ struct stat st;
|
|
|
37d6e3 |
+ if( 0 == stat(path,&st) && S_ISREG(st.st_mode) ) {
|
|
|
37d6e3 |
+ addsrcfile(path);
|
|
|
37d6e3 |
+ }
|
|
|
37d6e3 |
break;
|
|
|
37d6e3 |
}
|
|
|
37d6e3 |
}
|
|
|
37d6e3 |
--
|
|
|
37d6e3 |
2.26.2
|
|
|
37d6e3 |
|