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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-12-21 04:00:31 +00:00
parent 1ffbe07e17
commit 9f368b5ac9
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
Sat Dec 21 13:00:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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@ruby-lang.org>
* lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not

3
file.c
View File

@ -2510,6 +2510,9 @@ sys_fail2(VALUE s1, VALUE s2)
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, ", ");