summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-03 22:39:40 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-03 22:39:40 +0000
commitdf05c380d6fe0e067ff031db9d07ddc2420271ef (patch)
tree07eea7f67e56e3d30e4836c6eeb6127894b3a8aa /dir.c
parent74c37c00b0a58a53d55cfcc22eed91dc2837e545 (diff)
* dir.c (fnmatch): Make PERIOD() independent of FNM_PATHNAME.
This fixes a bug where fnmatch('/?a', '/.a', 0) returned true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 8ade547..d016bf4 100644
--- a/dir.c
+++ b/dir.c
@@ -141,7 +141,7 @@ range(pat, test, flags)
#define ISDIRSEP(c) (pathname && isdirsep(c))
#define PERIOD(s) (period && *(s) == '.' && \
- ((s) == string || ISDIRSEP((s)[-1])))
+ ((s) == string || isdirsep((s)[-1])))
static int
fnmatch(pat, string, flags)
const char *pat;