Skip to content

Commit c2f6489

Browse files
author
Gao Han
committed
Force ruby to treat directories and file names as UTF-8
1 parent b9862ae commit c2f6489

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/instance_agent/plugins/codedeploy/installer.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ def generate_directory_copy(i, absolute_source_path, destination)
9898
end
9999

100100
(Dir.entries(absolute_source_path) - [".", ".."]).each do |entry|
101+
entry = entry.force_encoding("UTF-8");
102+
absolute_source_path = absolute_source_path.force_encoding("UTF-8");
101103
absolute_entry_path = File.join(absolute_source_path, entry)
102104
entry_destination = File.join(destination, entry)
103105
if File.directory?(absolute_entry_path)

0 commit comments

Comments
 (0)