mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* file.c (file_expand_path): no need to expand root path which has no
short file name. [ruby-dev:35095] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
35b7b37c95
commit
232449ed55
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Jun 14 16:55:46 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* file.c (file_expand_path): no need to expand root path which has no
|
||||||
|
short file name. [ruby-dev:35095]
|
||||||
|
|
||||||
Fri Jun 13 23:08:02 2008 Tanaka Akira <akr@fsij.org>
|
Fri Jun 13 23:08:02 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* lib/time.rb (Time.xmlschema): don't accept decimal dot
|
* lib/time.rb (Time.xmlschema): don't accept decimal dot
|
||||||
|
|
6
file.c
6
file.c
|
@ -2746,14 +2746,14 @@ file_expand_path(fname, dname, result)
|
||||||
|
|
||||||
#if USE_NTFS
|
#if USE_NTFS
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
if (*(s = skipprefix(b = buf)) && !strpbrk(s, "*?")) {
|
if ((s = strrdirsep(b = buf)) != 0 && !strpbrk(s, "*?")) {
|
||||||
size_t len;
|
size_t len;
|
||||||
WIN32_FIND_DATA wfd;
|
WIN32_FIND_DATA wfd;
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
int lnk_added = 0, is_symlink = 0;
|
int lnk_added = 0, is_symlink = 0;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char w32buf[MAXPATHLEN];
|
char w32buf[MAXPATHLEN];
|
||||||
p = strrdirsep(s);
|
p = (char *)s;
|
||||||
if (lstat(buf, &st) == 0 && S_ISLNK(st.st_mode)) {
|
if (lstat(buf, &st) == 0 && S_ISLNK(st.st_mode)) {
|
||||||
is_symlink = 1;
|
is_symlink = 1;
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
@ -2782,7 +2782,7 @@ file_expand_path(fname, dname, result)
|
||||||
wfd.cFileName[len -= 4] = '\0';
|
wfd.cFileName[len -= 4] = '\0';
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
p = strrdirsep(s);
|
p = (char *)s;
|
||||||
#endif
|
#endif
|
||||||
++p;
|
++p;
|
||||||
BUFCHECK(bdiff + len >= buflen);
|
BUFCHECK(bdiff + len >= buflen);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue