зеркало из https://github.com/github/ruby.git
* file.c (file_path_convert): fix fs_encoding is not assign.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
d7ffefb405
Коммит
c796b348c6
|
@ -1,3 +1,7 @@
|
|||
Tue Nov 24 10:17:38 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* file.c (file_path_convert): fix fs_encoding is not assign.
|
||||
|
||||
Tue Nov 24 10:00:00 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* error.c (rb_strerrno): constified.
|
||||
|
|
4
file.c
4
file.c
|
@ -103,7 +103,7 @@ VALUE rb_cStat;
|
|||
|
||||
#define insecure_obj_p(obj, level) (level >= 4 || (level > 0 && OBJ_TAINTED(obj)))
|
||||
|
||||
VALUE
|
||||
static VALUE
|
||||
file_path_convert(VALUE name)
|
||||
{
|
||||
#ifndef _WIN32 /* non Windows == Unix */
|
||||
|
@ -113,7 +113,7 @@ file_path_convert(VALUE name)
|
|||
/* Mac OS X's file system encoding is UTF-8 */
|
||||
if (rb_usascii_encoding() != fname_encoding
|
||||
&& rb_ascii8bit_encoding() != fname_encoding
|
||||
&& rb_utf8_encoding() != fname_encoding
|
||||
&& (fs_encoding = rb_filesystem_encoding()) != fname_encoding
|
||||
&& rb_enc_find("UTF8-MAC") != fname_encoding) {
|
||||
/* Don't call rb_enc_find() before UTF-8 */
|
||||
name = rb_str_conv_enc(name, fname_encoding, fs_encoding);
|
||||
|
|
Загрузка…
Ссылка в новой задаче