summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_version.rb
diff options
context:
space:
mode:
authorNoah Kantrowitz <noah@coderanger.net>2014-10-04 15:31:51 -0700
committerNoah Kantrowitz <noah@coderanger.net>2014-10-04 15:31:51 -0700
commite6291e1af8e923f3af4c5ea864e815d27c53d4aa (patch)
treed3e44b3e109b50ac29437d61196b908d34131439 /lib/chef/cookbook_version.rb
parent41ff78b4088c4687637a1433dc1a17fc00a5523f (diff)
downloadchef-e6291e1af8e923f3af4c5ea864e815d27c53d4aa.tar.gz
More comment-y goodness.
Diffstat (limited to 'lib/chef/cookbook_version.rb')
-rw-r--r--lib/chef/cookbook_version.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb
index d76ec2b163..a72aab6490 100644
--- a/lib/chef/cookbook_version.rb
+++ b/lib/chef/cookbook_version.rb
@@ -679,7 +679,9 @@ class Chef
# Check if path is actually under root_path
next if parts[0] == '..'
if segment == :templates || segment == :files
+ # Check if pathname looks like files/foo or templates/foo (unscoped)
if pathname.each_filename.to_a.length == 2
+ # Use root_default in case the same path exists at root_default and default
return [ pathname.to_s, 'root_default' ]
else
return [ pathname.to_s, parts[1] ]