зеркало из https://github.com/github/ruby.git
* file.c (realpath_rec): rb_str_modify depends on the length, so
resize instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b4ba3ba641
Коммит
8aa6059dbf
|
@ -1,3 +1,8 @@
|
|||
Fri Aug 6 18:59:23 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* file.c (realpath_rec): rb_str_modify depends on the length, so
|
||||
resize instead.
|
||||
|
||||
Fri Aug 6 18:56:14 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* Makefile.in (clean-ext): fixed directories to be removed.
|
||||
|
|
3
file.c
3
file.c
|
@ -3229,8 +3229,7 @@ realpath_rec(long *prefixlenp, VALUE *resolvedp, char *unresolved, VALUE loopche
|
|||
char *resolved_names = RSTRING_PTR(*resolvedp) + *prefixlenp;
|
||||
char *lastsep = rb_path_last_separator(resolved_names);
|
||||
long len = lastsep ? lastsep - resolved_names : 0;
|
||||
rb_str_modify(*resolvedp);
|
||||
rb_str_set_len(*resolvedp, *prefixlenp + len);
|
||||
rb_str_resize(*resolvedp, *prefixlenp + len);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче