diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-17 06:10:23 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-17 06:10:23 +0000 |
commit | d15312360e11332ada78a0dc9822181fd3abfaab (patch) | |
tree | 093b8696e40f46cf1318a34c8f1c2bc4043852e0 /file.c | |
parent | 54f5ab713001fe2b12c32d629b37147066d1f7b3 (diff) |
* 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_7@17375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2746,14 +2746,14 @@ file_expand_path(fname, dname, 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'; @@ -2782,7 +2782,7 @@ file_expand_path(fname, dname, result) wfd.cFileName[len -= 4] = '\0'; } #else - p = strrdirsep(s); + p = (char *)s; #endif ++p; BUFCHECK(bdiff + len >= buflen); |