diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | glob.c | 8 |
2 files changed, 7 insertions, 6 deletions
@@ -607,3 +607,8 @@ Changes since rc-1.5b2 Portability: the proposed C 9x __va_copy() macro is called that, not va_copy(), as I thought. Furthermore, it is defined to be a macro, so we don't need to use autoconf to check for it. + +1999-10-11 + + Bug: absolute globs don't need special case in doglob(). Avoids + creating path names like `//tmp', which is a UNC path under CygWin. @@ -216,12 +216,8 @@ static List *doglob(char *w, char *m) { p = pattern; md = metadir; mp = metapattern; - if (*s == '/') - while (*s == '/') - *d++ = *s++, *md++ = *m++; - else - while (*s != '/' && *s != '\0') - *d++ = *s++, *md++ = *m++; /* get first directory component */ + while (*s != '/' && *s != '\0') + *d++ = *s++, *md++ = *m++; /* get first directory component */ *d = '\0'; /* Special case: no slashes in the pattern, i.e., open the current directory. |