From b18b4423c9f21f06bfdc13c2430582722981338e Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 29 Jan 2003 23:28:47 +0000 Subject: * 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 --- file.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index 257a086aad..eb6d2e01ef 100644 --- a/file.c +++ b/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; } -- cgit v1.2.3