diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-14 07:56:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-14 07:56:06 +0000 |
commit | 0a9897f6bd2383e1731c9c0bef124af78004ed03 (patch) | |
tree | 8b547a6480a91f17b50819013f0dd13a10c0ec5e /file.c | |
parent | 99c9cc6194f5dae32bca4f8146a94520542104f7 (diff) | |
download | ruby-0a9897f6bd2383e1731c9c0bef124af78004ed03.tar.gz ruby-0a9897f6bd2383e1731c9c0bef124af78004ed03.tar.xz ruby-0a9897f6bd2383e1731c9c0bef124af78004ed03.zip |
* file.c (file_expand_path): no need to expand root path which has no
short file name. [ruby-dev:35095]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |