[前][次][番号順一覧][スレッド一覧]

ruby-changes:32234

From: nobu <ko1@a...>
Date: Sat, 21 Dec 2013 13:00:38 +0900 (JST)
Subject: [ruby-changes:32234] nobu:r44313 (trunk): file.c: destination path only

nobu	2013-12-21 13:00:31 +0900 (Sat, 21 Dec 2013)

  New Revision: 44313

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44313

  Log:
    file.c: destination path only
    
    * file.c: remove unnecessary the source path from EEXIST error
      messages and show the destination path only.  [ruby-core:59202]
      [Feature #9263]

  Modified files:
    trunk/ChangeLog
    trunk/file.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44312)
+++ ChangeLog	(revision 44313)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Dec 21 13:00:20 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* file.c: remove unnecessary the source path from EEXIST error
+	  messages and show the destination path only.  [ruby-core:59202]
+	  [Feature #9263]
+
 Sat Dec 21 12:37:19 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not
Index: file.c
===================================================================
--- file.c	(revision 44312)
+++ file.c	(revision 44313)
@@ -2510,6 +2510,9 @@ sys_fail2(VALUE s1, VALUE s2) https://github.com/ruby/ruby/blob/trunk/file.c#L2510
     const int max_pathlen = MAXPATHLEN;
 #endif
 
+    if (errno == EEXIST) {
+	rb_sys_fail_path(rb_str_ellipsize(s2, max_pathlen));
+    }
     str = rb_str_new_cstr("(");
     rb_str_append(str, rb_str_ellipsize(s1, max_pathlen));
     rb_str_cat2(str, ", ");

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]