Formerly vpath.c.~8~

This commit is contained in:
Roland McGrath 1993-01-26 01:51:23 +00:00
parent 7444af63fc
commit 9a1a8d0dc6

32
vpath.c
View File

@ -191,24 +191,24 @@ construct_vpath_list (pattern, dirpath)
if (len > 1 && p[-1] == '/') if (len > 1 && p[-1] == '/')
--len; --len;
if (len == 1 && *v == '.') if (len > 1 || *v != '.')
continue;
v = savestring (v, len);
/* Verify that the directory actually exists. */
if (dir_file_exists_p (v, ""))
{ {
/* It does. Put it in the list. */ v = savestring (v, len);
vpath[elem++] = dir_name (v);
free (v); /* Verify that the directory actually exists. */
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. */ /* Skip over colons and blanks between entries. */
while (*p == ':' || isblank (*p)) while (*p == ':' || isblank (*p))