summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--dir.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index db6e45c12d..92e19c7556 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 24 18:59:37 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
+
+ * dir.c (glob_helper): '**/' should not match leading period
+ unless File::FNM_DOTMATCH is set. (like '*/')
+
Tue Feb 24 13:22:21 2004 Dave Thomas <dave@pragprog.com>
* lib/rdoc/rdoc.rb (RDoc::RDoc::normalized_file_list): Attempt to get better
diff --git a/dir.c b/dir.c
index be537ca236..b26eda4c38 100644
--- a/dir.c
+++ b/dir.c
@@ -981,6 +981,8 @@ glob_helper(path, sub, flags, func, arg)
if (recursive) {
if (strcmp(".", dp->d_name) == 0 || strcmp("..", dp->d_name) == 0)
continue;
+ if (fnmatch("*", dp->d_name, flags) != 0)
+ continue;
buf = ALLOC_N(char, strlen(base)+NAMLEN(dp)+strlen(m)+6);
sprintf(buf, "%s%s%s", base, (BASE) ? "/" : "", dp->d_name);
if (lstat(buf, &st) < 0) {