summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2016-02-29 13:51:41 -0800
committerMatt Wrock <matt@mattwrock.com>2016-02-29 13:51:41 -0800
commit5533dbb2917860dca16765d49079ed01a421fad8 (patch)
treeaa644571b72bbbab06811a7f0a18db9062dccbd6
parent8c26fb4fbf52cc8bf0104accaa818171fa6eae14 (diff)
parent7eac0ab50a10dec774d4db4618f88ebb8a6c3df5 (diff)
downloadchef-5533dbb2917860dca16765d49079ed01a421fad8.tar.gz
Merge pull request #4644 from chef/cleanpath
use Pathname#cleanpath instead of Chef::Util::PathHelper.cleanpath
-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