diff --git a/ChangeLog b/ChangeLog index 93686e9bd8..646f3eaedf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Dec 21 13:00:20 2013 Nobuyoshi Nakada + + * 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 * lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not diff --git a/file.c b/file.c index 77facacfcf..aee3fa6851 100644 --- a/file.c +++ b/file.c @@ -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, ", ");