From dd2d4bc29bc1d5160d76fc3e3e59a85fe110892e Mon Sep 17 00:00:00 2001 From: eban Date: Wed, 18 May 2005 08:41:50 +0000 Subject: [PATCH] * dir.c (glob_helper): check whether path is "" before calling do_opendir. [ruby-dev:26183] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ dir.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 160a46dd25..393cbeda4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed May 18 17:38:51 2005 WATANABE Hirofumi + + * dir.c (glob_helper): check whether path is "" before calling + do_opendir. [ruby-dev:26183] + Wed May 18 13:40:48 2005 NAKAMURA Usaku * win32/win32.c (NtInitialize): fix typo. diff --git a/dir.c b/dir.c index df1880eec4..bd9ea02a50 100644 --- a/dir.c +++ b/dir.c @@ -1263,7 +1263,7 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg) if (magical || recursive) { struct dirent *dp; - DIR *dirp = do_opendir(path); + DIR *dirp = do_opendir(*path ? path : "."); if (dirp == NULL) return 0; for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {