summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-21 04:00:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-21 04:00:31 +0000
commit9f368b5ac9b0cd889ed10095a6c1fcee8068db89 (patch)
treeb59b4baa25795f74bb6dd17993e5d50d2599a3bc /file.c
parent1ffbe07e179a2e047d24c7091f6ff013195b1a93 (diff)
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.c3
1 files changed, 3 insertions, 0 deletions
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, ", ");