зеркало из https://github.com/github/ruby.git
* file.c (rb_file_s_expand_path): removed a sludge.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
79862de363
Коммит
b18b4423c9
|
@ -1,3 +1,7 @@
|
|||
Thu Jan 30 08:27:19 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* file.c (rb_file_s_expand_path): removed a sludge.
|
||||
|
||||
Tue Jan 28 04:45:03 2003 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* instruby.rb (parse_args), ext/extmk.rb (parse_args): Prepend a
|
||||
|
|
7
file.c
7
file.c
|
@ -1464,12 +1464,15 @@ rb_file_s_expand_path(argc, argv)
|
|||
}
|
||||
BUFCHECK(strlen(dir) > buflen);
|
||||
strcpy(buf, dir);
|
||||
for (p = buf; p < buf + strlen(dir); p = CharNext(p)) {
|
||||
if (isdirsep(*p)) {
|
||||
#ifdef DOSISH
|
||||
for (p = buf; *p; p = CharNext(p)) {
|
||||
if (*p == '\\') {
|
||||
*p = '/';
|
||||
}
|
||||
}
|
||||
#else
|
||||
p = buf + strlen(dir);
|
||||
#endif
|
||||
s++;
|
||||
tainted = 1;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче