summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook/chefignore.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-06-21 15:32:48 -0600
committerJohn Keiser <jkeiser@opscode.com>2013-06-21 15:32:48 -0600
commit953a7757b1c01a7d72ee756ce07db97e436b6d59 (patch)
treef52093058c1a945b3c21a969a3a010712cd992cd /lib/chef/cookbook/chefignore.rb
parentd9cd91cb82487921ff2a16e6bfc9e34e80955002 (diff)
downloadchef-953a7757b1c01a7d72ee756ce07db97e436b6d59.tar.gz
Be more specific: check file? || symlink? instead of just directory?
Diffstat (limited to 'lib/chef/cookbook/chefignore.rb')
-rw-r--r--lib/chef/cookbook/chefignore.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/cookbook/chefignore.rb b/lib/chef/cookbook/chefignore.rb
index ea763e6eee..17c000350d 100644
--- a/lib/chef/cookbook/chefignore.rb
+++ b/lib/chef/cookbook/chefignore.rb
@@ -43,7 +43,8 @@ class Chef
def parse_ignore_file
ignore_globs = []
- if File.exist?(@ignore_file) && File.readable?(@ignore_file) && !File.directory?(@ignore_file)
+ if File.exist?(@ignore_file) && File.readable?(@ignore_file) &&
+ (File.file?(@ignore_file) || File.symlink?(@ignore_file))
File.foreach(@ignore_file) do |line|
ignore_globs << line.strip unless line =~ COMMENTS_AND_WHITESPACE
end