summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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