Skip to content

Commit f80b5b5

Browse files
committed
Fixes CHEF-681
1 parent 9789b39 commit f80b5b5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

chef-server-api/app/controllers/application.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ def load_cookbook_files(cookbook)
231231

232232
if segment == :templates || segment == :files
233233
mo = sf.match("cookbooks/#{cookbook.name}/#{segment}/(.+?)/(.+)")
234+
unless mo
235+
Chef::Log.debug("Skipping file #{sf}, as it doesn't have a proper segment.")
236+
next
237+
end
234238
specificity = mo[1]
235239
file_name = mo[2]
236240
url_options = { :cookbook_id => cookbook.name.to_s, :segment => segment, :id => file_name }

0 commit comments

Comments
 (0)