cscope/cscope-15.5-inverted.patch
2004-09-28 19:46:27 +00:00

16 lines
490 B
Diff

--- cscope-15.5/src/dir.c.orig 2004-09-28 14:43:17.706427680 -0400
+++ cscope-15.5/src/dir.c 2004-09-28 15:29:27.566344968 -0400
@@ -504,7 +505,11 @@
#endif
&& issrcfile(mybasename(path))
&& infilelist(path) == NO) {
- addsrcfile(path);
+ /* if the file is a symlink, make sure
+ * it points to a real file */
+ if(S_ISREG(buf.st_mode) ||
+ (S_ISLNK(buf.st_mode) && (stat(path,&buf) == 0)))
+ addsrcfile(path);
}
}
}