]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Formerly dir.c.~8~
authorRoland McGrath <roland@redhat.com>
Tue, 10 Nov 1992 20:43:35 +0000 (20:43 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 10 Nov 1992 20:43:35 +0000 (20:43 +0000)
dir.c

diff --git a/dir.c b/dir.c
index 8b03b8373e5fd67e893992ec17ed0f132343fa4b..977aa80e4eb2770c4101327df739737e364c4f9c 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -513,7 +513,9 @@ open_dirstream (directory)
   struct dirstream *new;
   struct directory *dir = find_directory (directory);
 
-  if (dir->contents == 0)
+  if (dir->contents == 0 || dir->contents->files == 0)
+    /* DIR->contents is nil if the directory could not be stat'd.
+       DIR->contents->files is nil if it could not be opened.  */
     return 0;
 
   /* Read all the contents of the directory now.  There is no benefit