summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2016-02-29 13:49:10 -0800
committerMatt Wrock <matt@mattwrock.com>2016-02-29 13:49:10 -0800
commit7eac0ab50a10dec774d4db4618f88ebb8a6c3df5 (patch)
tree94b394993ad9b2527b897dc2e1e6a30f0ace0983
parentdd1427893c5656600465ced2da06db76879edc0a (diff)
downloadchef-7eac0ab50a10dec774d4db4618f88ebb8a6c3df5.tar.gz
use Pathname#cleanpath instead of Chef::Util::PathHelper.cleanpath to compare globed files with forward slashes
-rw-r--r--lib/chef/cookbook/cookbook_version_loader.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb
index 12aff41d5c..48fa6a03a1 100644
--- a/lib/chef/cookbook/cookbook_version_loader.rb
+++ b/lib/chef/cookbook/cookbook_version_loader.rb
@@ -231,12 +231,12 @@ class Chef
Dir.glob(File.join(fs_entry, "**/*"), File::FNM_DOTMATCH).each do |file|
next if File.directory?(file)
- file = Chef::Util::PathHelper.cleanpath(file)
+ file = Pathname.new(file).cleanpath.to_s
name = Chef::Util::PathHelper.relative_path_from(@cookbook_path, file)
cookbook_settings[:all_files][name] = file
end
elsif File.file?(fs_entry)
- file = Chef::Util::PathHelper.cleanpath(fs_entry)
+ file = Pathname.new(fs_entry).cleanpath.to_s
next if File.basename(file) == UPLOADED_COOKBOOK_VERSION_FILE