* dir.c (dir_s_getwd): directory path's encoding should be filesystem's
one. * lib/tmpdir.rb: ditto (but not finished yet.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b28d9b6d18
commit
a610b0a959
@ -1,3 +1,10 @@
|
|||||||
|
Wed Jun 10 18:15:17 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* dir.c (dir_s_getwd): directory path's encoding should be filesystem's
|
||||||
|
one.
|
||||||
|
|
||||||
|
* lib/tmpdir.rb: ditto (but not finished yet.)
|
||||||
|
|
||||||
Wed Jun 10 06:28:15 2009 Eric Hodel <drbrain@segment7.net>
|
Wed Jun 10 06:28:15 2009 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/rubygems*: Upgrade to RubyGems 1.3.4 r2223.
|
* lib/rubygems*: Upgrade to RubyGems 1.3.4 r2223.
|
||||||
|
1
dir.c
1
dir.c
@ -816,6 +816,7 @@ dir_s_getwd(VALUE dir)
|
|||||||
rb_secure(4);
|
rb_secure(4);
|
||||||
path = my_getcwd();
|
path = my_getcwd();
|
||||||
cwd = rb_tainted_str_new2(path);
|
cwd = rb_tainted_str_new2(path);
|
||||||
|
rb_enc_associate(cwd, rb_filesystem_encoding());
|
||||||
|
|
||||||
xfree(path);
|
xfree(path);
|
||||||
return cwd;
|
return cwd;
|
||||||
|
@ -27,6 +27,7 @@ class Dir
|
|||||||
end
|
end
|
||||||
windir[getdir.call(windir, windir.size)..-1] = ""
|
windir[getdir.call(windir, windir.size)..-1] = ""
|
||||||
end
|
end
|
||||||
|
windir.force_encoding(Dir.pwd.encoding)
|
||||||
temp = File.expand_path('temp', windir.untaint)
|
temp = File.expand_path('temp', windir.untaint)
|
||||||
@@systmpdir = temp if File.directory?(temp) and File.writable?(temp)
|
@@systmpdir = temp if File.directory?(temp) and File.writable?(temp)
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
|
Loading…
x
Reference in New Issue
Block a user