diff options
Diffstat (limited to 'lib/chef/cookbook_manifest.rb')
-rw-r--r-- | lib/chef/cookbook_manifest.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/cookbook_manifest.rb b/lib/chef/cookbook_manifest.rb index 526c183339..9adcee6b78 100644 --- a/lib/chef/cookbook_manifest.rb +++ b/lib/chef/cookbook_manifest.rb @@ -204,7 +204,8 @@ class Chef def root_files manifest[:all_files].select do |file| - file[:name].split("/").length == 1 + segment, name = file[:name].split("/") + name.nil? || segment == "root_files" end end @@ -271,7 +272,7 @@ class Chef next if parts[0] == ".." # if we have a root_file, such as metadata.rb, the first part will be "." - return [ pathname.to_s, pathname.to_s, "default" ] if parts.length == 1 + return [ "root_files/#{pathname}", pathname.to_s, "default" ] if parts.length == 1 segment = parts[0] |