diff options
author | danielsdeleo <dan@chef.io> | 2016-02-26 17:28:45 -0800 |
---|---|---|
committer | danielsdeleo <dan@chef.io> | 2016-02-26 17:42:30 -0800 |
commit | c170a5addb70ffd014ba9ec6e43d2bd72e56529e (patch) | |
tree | 24a377b8ff188191276ce0d1860ed8be52380ac7 /lib | |
parent | 1691eab8b6b1abcf532858718fabe1bcdd10bd30 (diff) | |
download | chef-list-unignored-files.tar.gz |
Filter out directory paths from all_files when loadinglist-unignored-files
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/cookbook/cookbook_version_loader.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb index 5b6cf4b468..6ef9d75030 100644 --- a/lib/chef/cookbook/cookbook_version_loader.rb +++ b/lib/chef/cookbook/cookbook_version_loader.rb @@ -230,6 +230,7 @@ class Chef next if dir_relpath.to_s.start_with?(".") Dir.glob(File.join(fs_entry, "**/*"), File::FNM_DOTMATCH).each do |file| + next if File.directory?(file) file = Chef::Util::PathHelper.cleanpath(file) name = Chef::Util::PathHelper.relative_path_from(@cookbook_path, file) cookbook_settings[:all_files][name] = file @@ -261,7 +262,6 @@ class Chef glob_pattern = File.join(Chef::Util::PathHelper.escape_glob_dir(cookbook_path, category_dir), "**", glob) select_files_by_glob(glob_pattern, File::FNM_DOTMATCH).each do |file| file = Chef::Util::PathHelper.cleanpath(file) - next if File.directory?(file) name = Chef::Util::PathHelper.relative_path_from(@cookbook_path, file) cookbook_settings[category][name] = file end |