added depend label
[unix-history] / usr / src / usr.bin / find / find.c
index 2199f6b..d8e7142 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef        lint
 #ifndef        lint
-static char *sccsid = "@(#)find.c      4.17 (Berkeley) %G%";
+static char *sccsid = "@(#)find.c      4.18 (Berkeley) %G%";
 #endif
 
 #include <stdio.h>
 #endif
 
 #include <stdio.h>
@@ -643,6 +643,10 @@ descend(name, fname, exlist)
           !Xdev && Devstat.st_dev != Statb.st_dev)
                return(1);
 
           !Xdev && Devstat.st_dev != Statb.st_dev)
                return(1);
 
+       if (Statb.st_nlink == 2 && exlist->F == and &&
+               exlist->L->F == type && ((int) (exlist->L->L)) == S_IFDIR)
+                       return(1);
+
        for (c1 = name; *c1; ++c1);
        if (*(c1-1) == '/')
                --c1;
        for (c1 = name; *c1; ++c1);
        if (*(c1-1) == '/')
                --c1;