зеркало из https://github.com/github/ruby.git
dir.c: set PLAIN for non-magical
* dir.c (glob_make_pattern): set PLAIN for non-magical path to skip parts which not need to glob. [ruby-core:61552] [Bug #9648] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
47f4eee420
Коммит
f88481740a
|
@ -1,4 +1,8 @@
|
|||
Sat May 17 10:05:05 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sat May 17 10:40:33 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* dir.c (glob_make_pattern): set PLAIN for non-magical path to
|
||||
skip parts which not need to glob.
|
||||
[ruby-core:61552] [Bug #9648]
|
||||
|
||||
* dir.c (has_magic): return ALPHA at alphabetical name regardless
|
||||
FNM_CASEFOLD flag.
|
||||
|
|
2
dir.c
2
dir.c
|
@ -1229,7 +1229,7 @@ glob_make_pattern(const char *p, const char *e, int flags, rb_encoding *enc)
|
|||
}
|
||||
memcpy(buf, p, m-p);
|
||||
buf[m-p] = '\0';
|
||||
tmp->type = magic > MAGICAL ? MAGICAL : magic;
|
||||
tmp->type = magic > MAGICAL ? MAGICAL : magic > non_magic ? magic : PLAIN;
|
||||
tmp->str = buf;
|
||||
if (*m) {
|
||||
dirsep = 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче