Skip to content

Commit

Permalink
Force ruby to treat directories and file names as UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
Gao Han committed May 11, 2016
1 parent b9862ae commit c2f6489
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/instance_agent/plugins/codedeploy/installer.rb
Expand Up @@ -98,6 +98,8 @@ def generate_directory_copy(i, absolute_source_path, destination)
end

(Dir.entries(absolute_source_path) - [".", ".."]).each do |entry|
entry = entry.force_encoding("UTF-8");
absolute_source_path = absolute_source_path.force_encoding("UTF-8");
absolute_entry_path = File.join(absolute_source_path, entry)
entry_destination = File.join(destination, entry)
if File.directory?(absolute_entry_path)
Expand Down

0 comments on commit c2f6489

Please sign in to comment.