зеркало из https://github.com/github/ruby.git
* 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/trunk@17160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
fc3c60f608
Коммит
1df1cb307e
|
@ -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]
|
||||
|
||||
Sat Jun 14 11:59:17 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* gc.h (STACK_UPPER): moved from gc.c
|
||||
|
|
6
file.c
6
file.c
|
@ -2829,14 +2829,14 @@ file_expand_path(VALUE fname, VALUE dname, VALUE result)
|
|||
|
||||
#if USE_NTFS
|
||||
*p = '\0';
|
||||
if (*(s = skipprefix(b = buf)) && !strpbrk(s, "*?")) {
|
||||
if ((s = strrdirsep(b = buf)) != 0 && !strpbrk(s, "*?")) {
|
||||
size_t len;
|
||||
WIN32_FIND_DATA wfd;
|
||||
#ifdef __CYGWIN__
|
||||
int lnk_added = 0, is_symlink = 0;
|
||||
struct stat st;
|
||||
char w32buf[MAXPATHLEN];
|
||||
p = strrdirsep(s);
|
||||
p = (char *)s;
|
||||
if (lstat(buf, &st) == 0 && S_ISLNK(st.st_mode)) {
|
||||
is_symlink = 1;
|
||||
*p = '\0';
|
||||
|
@ -2865,7 +2865,7 @@ file_expand_path(VALUE fname, VALUE dname, VALUE result)
|
|||
wfd.cFileName[len -= 4] = '\0';
|
||||
}
|
||||
#else
|
||||
p = strrdirsep(s);
|
||||
p = (char *)s;
|
||||
#endif
|
||||
++p;
|
||||
BUFCHECK(bdiff + len >= buflen);
|
||||
|
|
Загрузка…
Ссылка в новой задаче