Formerly vpath.c.~8~
authorRoland McGrath <roland@redhat.com>
Tue, 26 Jan 1993 01:51:23 +0000 (01:51 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 26 Jan 1993 01:51:23 +0000 (01:51 +0000)
vpath.c

diff --git a/vpath.c b/vpath.c
index f076cae..730f989 100644 (file)
--- a/vpath.c
+++ b/vpath.c
@@ -191,24 +191,24 @@ construct_vpath_list (pattern, dirpath)
       if (len > 1 && p[-1] == '/')
        --len;
 
-      if (len == 1 && *v == '.')
-       continue;
-
-      v = savestring (v, len);
+      if (len > 1 || *v != '.')
+       {
+         v = savestring (v, len);
 
-      /* Verify that the directory actually exists.  */
+         /* Verify that the directory actually exists.  */
 
-      if (dir_file_exists_p (v, ""))
-       {
-         /* It does.  Put it in the list.  */
-         vpath[elem++] = dir_name (v);
-         free (v);
-         if (len > maxvpath)
-           maxvpath = len;
+         if (dir_file_exists_p (v, ""))
+           {
+             /* It does.  Put it in the list.  */
+             vpath[elem++] = dir_name (v);
+             free (v);
+             if (len > maxvpath)
+               maxvpath = len;
+           }
+         else
+           /* The directory does not exist.  Omit from the list.  */
+           free (v);
        }
-      else
-       /* The directory does not exist.  Omit from the list.  */
-       free (v);
 
       /* Skip over colons and blanks between entries.  */
       while (*p == ':' || isblank (*p))