mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
d7ffefb405
commit
c796b348c6
2 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue