ruby-changes:5653
From: nobu <ko1@a...>
Date: Sat, 14 Jun 2008 16:57:43 +0900 (JST)
Subject: [ruby-changes:5653] Ruby:r17160 (trunk, ruby_1_8): * file.c (file_expand_path): no need to expand root path which has no
nobu 2008-06-14 16:56:06 +0900 (Sat, 14 Jun 2008)
New Revision: 17160
Modified files:
branches/ruby_1_8/ChangeLog
branches/ruby_1_8/file.c
trunk/ChangeLog
trunk/file.c
Log:
* file.c (file_expand_path): no need to expand root path which has no
short file name. [ruby-dev:35095]
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/file.c?r1=17160&r2=17159&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=17160&r2=17159&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17160&r2=17159&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/file.c?r1=17160&r2=17159&diff_format=u
Index: ChangeLog
===================================================================
--- ChangeLog (revision 17159)
+++ ChangeLog (revision 17160)
@@ -1,3 +1,8 @@
+Sat Jun 14 16:55:46 2008 Nobuyoshi Nakada <nobu@r...>
+
+ * 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@r...>
* gc.h (STACK_UPPER): moved from gc.c
Index: file.c
===================================================================
--- file.c (revision 17159)
+++ file.c (revision 17160)
@@ -2829,14 +2829,14 @@
#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 @@
wfd.cFileName[len -= 4] = '\0';
}
#else
- p = strrdirsep(s);
+ p = (char *)s;
#endif
++p;
BUFCHECK(bdiff + len >= buflen);
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog (revision 17159)
+++ ruby_1_8/ChangeLog (revision 17160)
@@ -1,3 +1,8 @@
+Sat Jun 14 16:55:46 2008 Nobuyoshi Nakada <nobu@r...>
+
+ * 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@f...>
* lib/time.rb (Time.xmlschema): don't accept decimal dot
Index: ruby_1_8/file.c
===================================================================
--- ruby_1_8/file.c (revision 17159)
+++ ruby_1_8/file.c (revision 17160)
@@ -2746,14 +2746,14 @@
#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 @@
wfd.cFileName[len -= 4] = '\0';
}
#else
- p = strrdirsep(s);
+ p = (char *)s;
#endif
++p;
BUFCHECK(bdiff + len >= buflen);
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/