mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
dir.c: fix up r59527
* dir.c (glob_helper): fix up r59527, dot files other than current directory should not be included unless FNM_DOTMATCH is given. [ruby-core:82266] [Bug #13785] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9c69e0a877
commit
ec4af34efb
1 changed files with 2 additions and 1 deletions
3
dir.c
3
dir.c
|
@ -2070,7 +2070,8 @@ glob_helper(
|
|||
if (p->type == RECURSIVE) {
|
||||
if (new_pathtype == path_directory || /* not symlink but real directory */
|
||||
new_pathtype == path_exist) {
|
||||
if (dotfile < 2) *new_end++ = p; /* append recursive pattern */
|
||||
if (dotfile < ((flags & FNM_DOTMATCH) ? 2 : 1))
|
||||
*new_end++ = p; /* append recursive pattern */
|
||||
}
|
||||
p = p->next; /* 0 times recursion */
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue