diff options
author | Matt Wrock <matt@mattwrock.com> | 2016-02-24 20:27:56 -0800 |
---|---|---|
committer | Matt Wrock <matt@mattwrock.com> | 2016-02-24 20:27:56 -0800 |
commit | b912d1075286261b0e9523cecff1997b59034b75 (patch) | |
tree | 1aea8c311c4a800e646f1ab0841e828b4812d1b0 /chef-config | |
parent | 1967e8c24ff5990f5352cec4ae84691b1643b2e1 (diff) | |
download | chef-b912d1075286261b0e9523cecff1997b59034b75.tar.gz |
ensure paths maintain utf-8ness in non ascii encodingsumlaut
Diffstat (limited to 'chef-config')
-rw-r--r-- | chef-config/lib/chef-config/path_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chef-config/lib/chef-config/path_helper.rb b/chef-config/lib/chef-config/path_helper.rb index 10384974c7..42047b5e22 100644 --- a/chef-config/lib/chef-config/path_helper.rb +++ b/chef-config/lib/chef-config/path_helper.rb @@ -224,7 +224,7 @@ module ChefConfig paths = paths.map { |home_path| home_path.gsub(path_separator, ::File::SEPARATOR) if home_path } # Filter out duplicate paths and paths that don't exist. - valid_paths = paths.select { |home_path| home_path && Dir.exists?(home_path) } + valid_paths = paths.select { |home_path| home_path && Dir.exists?(home_path.force_encoding("utf-8")) } valid_paths = valid_paths.uniq # Join all optional path elements at the end. |