зеркало из https://github.com/github/ruby.git
* dir.c (glob_helper): remove escaping backslashes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8473a82934
Коммит
65ea437148
|
@ -1,3 +1,7 @@
|
|||
Sat May 11 10:52:09 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* dir.c (glob_helper): remove escaping backslashes.
|
||||
|
||||
Fri May 10 19:00:47 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* parse.y (here_document): preserve line number begins here
|
||||
|
|
6
dir.c
6
dir.c
|
@ -637,7 +637,6 @@ static void
|
|||
remove_backslashes(p)
|
||||
char *p;
|
||||
{
|
||||
#if defined DOSISH
|
||||
char *pend = p + strlen(p);
|
||||
char *t = p;
|
||||
|
||||
|
@ -648,7 +647,6 @@ remove_backslashes(p)
|
|||
*t++ = *p++;
|
||||
}
|
||||
*t = '\0';
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef S_ISDIR
|
||||
|
@ -668,7 +666,11 @@ glob_helper(path, sub, flags, func, arg)
|
|||
|
||||
p = sub ? sub : path;
|
||||
if (!has_magic(p, 0, flags)) {
|
||||
#if defined DOSISH
|
||||
remove_backslashes(path);
|
||||
#else
|
||||
if (!(flags & FNM_NOESCAPE)) remove_backslashes(p);
|
||||
#endif
|
||||
if (stat(path, &st) == 0) {
|
||||
(*func)(path, arg);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче