<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -35,6 +35,8 @@ from pygments.util import ClassNotFound
 from pygments.formatters import HtmlFormatter
 from pygments.lexers import get_lexer_for_filename
 
+from zipfile import ZipFile
+
 CHARACTERS_TO_STRIP = re.compile(r&quot;[ \.,\!\?'\&quot;;:/\\+=#]+&quot;)
 def sluggify(str):
     return CHARACTERS_TO_STRIP.subn(u&quot;-&quot;, str.lower())[0].strip(&quot;-&quot;)
@@ -329,7 +331,13 @@ def display_resource(request, id):
     if ext in IMAGE_EXTS:
         opts['type'] = &quot;image&quot;
     elif ext in ZIP_EXTS:
-        opts['type'] = &quot;zip&quot;
+        try:
+            opts['type'] = &quot;zip&quot;
+            zf = ZipFile(res.get_content_filename(),'r')
+            opts['files_list'] = zf.namelist()
+            zf.close()
+        except IOError:
+            opts['type'] = &quot;file&quot;
     else:
         try:
             lexer = get_lexer_for_filename(file)</diff>
      <filename>editor/views.py</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,14 @@
 {% endifequal %}
 
 {% ifequal type &quot;zip&quot; %}
+&lt;div class=&quot;extra&quot;&gt;
+  &lt;ul&gt;
+    {% for file in files_list %}
+    &lt;li&gt;{{ file }}&lt;/li&gt;
+    {% endfor %}
+  &lt;/ul&gt;
+&lt;/div&gt;
+
 {% endifequal %}
 
 {% ifequal type &quot;code&quot; %}</diff>
      <filename>templates/lifeflow/editor/resource.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>844a3d6c96070d32730203976ffba0281389362a</id>
    </parent>
  </parents>
  <author>
    <name>Will Larson</name>
    <email>lethain@gmail.com</email>
  </author>
  <url>http://github.com/lethain/lifeflow/commit/95d6989673b98dff87dad9aa408fc68de9ce8676</url>
  <id>95d6989673b98dff87dad9aa408fc68de9ce8676</id>
  <committed-date>2008-07-10T02:31:52-07:00</committed-date>
  <authored-date>2008-07-10T02:31:52-07:00</authored-date>
  <message>Improved LFE file viewer to show contents of .zip files.</message>
  <tree>a193f1a246308a0858341260f09e6f5e6ae16d7b</tree>
  <committer>
    <name>Will Larson</name>
    <email>lethain@gmail.com</email>
  </committer>
</commit>
