diff options
author | Roland McGrath <roland@redhat.com> | 1993-01-26 01:51:23 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1993-01-26 01:51:23 +0000 |
commit | 9a1a8d0dc616921d6f8dc70eebebca1da9e91d81 (patch) | |
tree | 9211b05be1b69f43ebeba9c42c351afb18df9f3c /vpath.c | |
parent | 7444af63fcf7d440496d68e4213acdc5f540d2ff (diff) | |
download | gunmake-9a1a8d0dc616921d6f8dc70eebebca1da9e91d81.tar.gz |
Formerly vpath.c.~8~
Diffstat (limited to 'vpath.c')
-rw-r--r-- | vpath.c | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -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)) |