don't bother stating the root paths, if FTS_NOSTAT set
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 10 Jun 1990 09:32:43 +0000 (01:32 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sun, 10 Jun 1990 09:32:43 +0000 (01:32 -0800)
SCCS-vsn: lib/libc/gen/fts.c 5.10

usr/src/lib/libc/gen/fts.c

index 5361ae7..d6d2d3f 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fts.c      5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)fts.c      5.10 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
@@ -87,7 +87,8 @@ ftsopen(argv, options, compar)
                        p->fts_link = root;
                        root = p;
                        p->fts_accpath = p->fts_name;
                        p->fts_link = root;
                        root = p;
                        p->fts_accpath = p->fts_name;
-                       p->fts_info = fts_stat(p, 0);
+                       if (!(options & FTS_NOSTAT))
+                               p->fts_info = fts_stat(p, 0);
                } else {
                        p->fts_link = NULL;
                        if (!root)
                } else {
                        p->fts_link = NULL;
                        if (!root)