1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
eban 2005-05-18 08:41:50 +00:00
parent a70902a5c9
commit dd2d4bc29b
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Wed May 18 17:38:51 2005 WATANABE Hirofumi <eban@ruby-lang.org>
* dir.c (glob_helper): check whether path is "" before calling
do_opendir. [ruby-dev:26183]
Wed May 18 13:40:48 2005 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (NtInitialize): fix typo.

2
dir.c
View file

@ -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)) {