diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-21 04:00:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-21 04:00:31 +0000 |
commit | 9f368b5ac9b0cd889ed10095a6c1fcee8068db89 (patch) | |
tree | b59b4baa25795f74bb6dd17993e5d50d2599a3bc /file.c | |
parent | 1ffbe07e179a2e047d24c7091f6ff013195b1a93 (diff) | |
download | ruby-9f368b5ac9b0cd889ed10095a6c1fcee8068db89.tar.gz |
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
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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, ", "); |