From d884971193ef4934424b77ae862e8b0ecf70bab3 Mon Sep 17 00:00:00 2001 From: Toby Goodwin Date: Wed, 13 Aug 2003 13:51:14 +0100 Subject: release: rc-1.7.1 --- glob.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'glob.c') diff --git a/glob.c b/glob.c index ac26203..b472af9 100644 --- a/glob.c +++ b/glob.c @@ -1,7 +1,7 @@ /* glob.c: rc's (ugly) globber. This code is not elegant, but it works */ #include "rc.h" -#include +#include "stat.h" /* Lifted from autoconf documentation.*/ #if HAVE_DIRENT_H @@ -86,7 +86,7 @@ extern List *glob(List *s) { /* Matches a pattern p against the contents of directory d */ static List *dmatch(char *d, char *p, char *m) { - bool matched = FALSE; + bool matched; List *top, *r; static DIR *dirp; static struct dirent *dp; @@ -107,7 +107,7 @@ static List *dmatch(char *d, char *p, char *m) { if (matched) { char *path = nprint("%s/%s", d, p); - if (stat(path, &s) < 0) + if (lstat(path, &s) < 0) return NULL; r = nnew(List); r->w = ncpy(p); -- cgit v1.2.3