<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -231,6 +231,10 @@ class ChefServerApi::Application &lt; Merb::Controller
 
         if segment == :templates || segment == :files
           mo = sf.match(&quot;cookbooks/#{cookbook.name}/#{segment}/(.+?)/(.+)&quot;)
+          unless mo
+            Chef::Log.debug(&quot;Skipping file #{sf}, as it doesn't have a proper segment.&quot;)
+            next
+          end
           specificity = mo[1]
           file_name = mo[2]
           url_options = { :cookbook_id =&gt; cookbook.name.to_s, :segment =&gt; segment, :id =&gt; file_name }</diff>
      <filename>chef-server-api/app/controllers/application.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9789b3973be8f3f3c49ac76a31f156d0520f30c7</id>
    </parent>
  </parents>
  <author>
    <name>Adam Jacob</name>
    <email>adam@opscode.com</email>
  </author>
  <url>http://github.com/opscode/chef/commit/f80b5b578a6000b1da64e2c558f9bc4e5dc33872</url>
  <id>f80b5b578a6000b1da64e2c558f9bc4e5dc33872</id>
  <committed-date>2009-11-03T16:11:44-08:00</committed-date>
  <authored-date>2009-11-03T16:11:44-08:00</authored-date>
  <message>Fixes CHEF-681</message>
  <tree>e69e6c3c2176bfd315228a20dffca0dc30a3d216</tree>
  <committer>
    <name>Adam Jacob</name>
    <email>adam@opscode.com</email>
  </committer>
</commit>
