summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-18 08:41:50 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-18 08:41:50 +0000
commitdd2d4bc29bc1d5160d76fc3e3e59a85fe110892e (patch)
treef7b448475c27fdf945c36bc301b7cd45e11b64c5 /dir.c
parenta70902a5c9888b45cedc235fd913b7ab88e8c9f6 (diff)
* 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
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 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)) {