summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-29 23:28:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-29 23:28:47 +0000
commitb18b4423c9f21f06bfdc13c2430582722981338e (patch)
tree5582a1580f62cc35a0ea79b2fbb712b33593e12f /file.c
parent79862de36334225179ee4e462ccb982ea5250800 (diff)
* 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
Diffstat (limited to 'file.c')
-rw-r--r--file.c7
1 files changed, 5 insertions, 2 deletions
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;
}