summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-01-17 08:24:22 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-01-17 08:24:22 +0000
commit3b992de6c0c96f0dcf8931c1f0baa561f9b9538a (patch)
treeffe44e7d3725919c2d14e3addcf98eaea957710b /file.c
parent037b710e18fe1101428ef235ec80b831c1e0d081 (diff)
2000-01-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/file.c b/file.c
index 543448a315..e22f9b2f6c 100644
--- a/file.c
+++ b/file.c
@@ -6,7 +6,7 @@
$Date$
created at: Mon Nov 15 12:24:34 JST 1993
- Copyright (C) 1993-1999 Yukihiro Matsumoto
+ Copyright (C) 1993-2000 Yukihiro Matsumoto
************************************************/
@@ -1126,7 +1126,7 @@ rb_file_s_expand_path(argc, argv)
p = &buf[strlen(buf)];
while (p > buf && *(p - 1) == '/') p--;
}
- else if (isdirsep(*s)) {
+ else {
while (*s && isdirsep(*s)) {
*p++ = '/';
s++;
@@ -1148,7 +1148,8 @@ rb_file_s_expand_path(argc, argv)
}
else {
*++p = '.';
- *++p = '.';
+ do *++p = '.'; while (*++s == '.');
+ --s;
}
break;
case '/':