File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1559,7 +1559,15 @@ def check_have_lchown?
15591559 def join ( dir , base )
15601560 return File . path ( dir ) if not base or base == '.'
15611561 return File . path ( base ) if not dir or dir == '.'
1562- File . join ( dir , base )
1562+ begin
1563+ File . join ( dir , base )
1564+ rescue EncodingError
1565+ if fu_windows?
1566+ File . join ( dir . encode ( ::Encoding ::UTF_8 ) , base . encode ( ::Encoding ::UTF_8 ) )
1567+ else
1568+ raise
1569+ end
1570+ end
15631571 end
15641572
15651573 if File ::ALT_SEPARATOR
Original file line number Diff line number Diff line change @@ -771,9 +771,6 @@ def test_remove_entry_multibyte_path
771771
772772 remove_entry dir
773773 assert_file_not_exist dir
774- rescue MiniTest ::Assertion
775- STDERR . puts Dir . glob ( "#{ dir } /**/*" ) . inspect
776- raise
777774 end
778775
779776 def test_remove_entry_secure
You can’t perform that action at this time.
0 commit comments