Skip to content

Commit 5a6dd6f

Browse files
znzhsbt
authored andcommitted
Revert d231b8f95b35d8a344cec4f62d7bbdf360a70e1c and add debug print
1 parent bffb9c9 commit 5a6dd6f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

lib/fileutils.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,11 +1289,7 @@ def door?
12891289

12901290
def entries
12911291
opts = {}
1292-
if fu_windows? && ::Encoding.compatible?(::Encoding::UTF_8, path.encoding)
1293-
opts[:encoding] = ::Encoding::UTF_8
1294-
else
1295-
opts[:encoding] = path.encoding
1296-
end
1292+
opts[:encoding] = fu_windows? ? ::Encoding::UTF_8 : path.encoding
12971293

12981294
files = if Dir.respond_to?(:children)
12991295
Dir.children(path, **opts)

test/fileutils/test_fileutils.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,10 @@ def test_remove_entry_multibyte_path
770770
File.write("#{dir}/#{c}.txt", "test_remove_entry_multibyte_path")
771771

772772
remove_entry dir
773-
assert_file_not_exist dir
773+
assert_no_file_exist dir
774+
rescue MiniTest::Assertion
775+
STDERR.puts Dir.glob("#{dir}/**").inspect
776+
raise
774777
end
775778

776779
def test_remove_entry_secure

0 commit comments

Comments
 (0)