Revert d231b8f95b35d8a344cec4f62d7bbdf360a70e1c and add debug print
This commit is contained in:
parent
78352fb52e
commit
7ac6c967e4
@ -1287,11 +1287,7 @@ module FileUtils
|
|||||||
|
|
||||||
def entries
|
def entries
|
||||||
opts = {}
|
opts = {}
|
||||||
if fu_windows? && ::Encoding.compatible?(::Encoding::UTF_8, path.encoding)
|
opts[:encoding] = fu_windows? ? ::Encoding::UTF_8 : path.encoding
|
||||||
opts[:encoding] = ::Encoding::UTF_8
|
|
||||||
else
|
|
||||||
opts[:encoding] = path.encoding
|
|
||||||
end
|
|
||||||
|
|
||||||
files = if Dir.respond_to?(:children)
|
files = if Dir.respond_to?(:children)
|
||||||
Dir.children(path, **opts)
|
Dir.children(path, **opts)
|
||||||
|
@ -770,7 +770,10 @@ class TestFileUtils < Test::Unit::TestCase
|
|||||||
File.write("#{dir}/#{c}.txt", "test_remove_entry_multibyte_path")
|
File.write("#{dir}/#{c}.txt", "test_remove_entry_multibyte_path")
|
||||||
|
|
||||||
remove_entry dir
|
remove_entry dir
|
||||||
assert_file_not_exist dir
|
assert_no_file_exist dir
|
||||||
|
rescue MiniTest::Assertion
|
||||||
|
STDERR.puts Dir.glob("#{dir}/**").inspect
|
||||||
|
raise
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_remove_entry_secure
|
def test_remove_entry_secure
|
||||||
|
Loading…
x
Reference in New Issue
Block a user