diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-24 01:20:18 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-24 01:20:18 +0000 |
commit | c796b348c6b4ce35a1dc4808881cd6177f3dfa96 (patch) | |
tree | 61a6c9935903f1e32dd0c8dba4e2b96cc2787108 | |
parent | d7ffefb4059f95279f084d26ab04d92c7eb89975 (diff) | |
download | ruby-c796b348c6b4ce35a1dc4808881cd6177f3dfa96.tar.gz |
* 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
-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); |