* lib/fileutils.rb (FileUtils::Entry_#entries): returns pathname in
UTF-8 on Windows to allow FileUtils accessing all pathnames internally. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2f39988511
commit
fef3c0a415
@ -1,3 +1,9 @@
|
||||
Mon May 17 09:37:25 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* lib/fileutils.rb (FileUtils::Entry_#entries): returns pathname in
|
||||
UTF-8 on Windows to allow FileUtils accessing all pathnames
|
||||
internally.
|
||||
|
||||
Mon May 17 01:07:48 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* dln.c (rb_w32_check_imported): workaround for VC6.
|
||||
|
@ -1176,7 +1176,9 @@ module FileUtils
|
||||
end
|
||||
|
||||
def entries
|
||||
Dir.entries(path())\
|
||||
opts = {}
|
||||
opts[:encoding] = "UTF-8" if /mswin|mignw/ =~ RUBY_PLATFORM
|
||||
Dir.entries(path(), opts)\
|
||||
.reject {|n| n == '.' or n == '..' }\
|
||||
.map {|n| Entry_.new(prefix(), join(rel(), n.untaint)) }
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user