*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d0d70d648d
commit
8fe2085eb7
15
file.c
15
file.c
@ -1591,7 +1591,6 @@ file_expand_path(fname, dname, result)
|
|||||||
strcpy(buf, dir);
|
strcpy(buf, dir);
|
||||||
free(dir);
|
free(dir);
|
||||||
}
|
}
|
||||||
p = skiproot(buf);
|
|
||||||
#ifdef DOSISH
|
#ifdef DOSISH
|
||||||
if (isdirsep(*s)) {
|
if (isdirsep(*s)) {
|
||||||
/* specified full path, but not drive letter nor UNC */
|
/* specified full path, but not drive letter nor UNC */
|
||||||
@ -1601,24 +1600,24 @@ file_expand_path(fname, dname, result)
|
|||||||
}
|
}
|
||||||
else if (isdirsep(buf[0]) && isdirsep(buf[1])) {
|
else if (isdirsep(buf[0]) && isdirsep(buf[1])) {
|
||||||
/* or UNC share name */
|
/* or UNC share name */
|
||||||
if (*(p = nextdirsep(p))) p = nextdirsep(p + 1);
|
if (*(p = nextdirsep(buf + 2))) p = nextdirsep(p + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (*p)
|
p = chompdirsep(skiproot(buf));
|
||||||
p = chompdirsep(p);
|
|
||||||
else if (p > buf)
|
|
||||||
--p;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
b = s;
|
b = s;
|
||||||
do s++; while (isdirsep(*s));
|
do s++; while (isdirsep(*s));
|
||||||
p = buf + (s - b) - 1;
|
p = buf + (s - b);
|
||||||
BUFCHECK(p >= pend);
|
BUFCHECK(p >= pend);
|
||||||
memset(buf, '/', p - buf);
|
memset(buf, '/', p - buf);
|
||||||
}
|
}
|
||||||
*p = '/';
|
if (p > buf && p[-1] == '/')
|
||||||
|
--p;
|
||||||
|
else
|
||||||
|
*p = '/';
|
||||||
|
|
||||||
b = s;
|
b = s;
|
||||||
while (*s) {
|
while (*s) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user