[前][次][番号順一覧][スレッド一覧]

ruby-changes:47413

From: nobu <ko1@a...>
Date: Tue, 8 Aug 2017 19:43:24 +0900 (JST)
Subject: [ruby-changes:47413] nobu:r59529 (trunk): dir.c: fix up r59527

nobu	2017-08-08 19:43:19 +0900 (Tue, 08 Aug 2017)

  New Revision: 59529

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59529

  Log:
    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]

  Modified files:
    trunk/dir.c
Index: dir.c
===================================================================
--- dir.c	(revision 59528)
+++ dir.c	(revision 59529)
@@ -2070,7 +2070,8 @@ glob_helper( https://github.com/ruby/ruby/blob/trunk/dir.c#L2070
 		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 */
 		}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]