diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | file.c | 4 |
2 files changed, 6 insertions, 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. @@ -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); |