]> git.cworth.org Git - sup/blobdiff - lib/sup/message-chunks.rb
Merge branch 'index-locking' into next
[sup] / lib / sup / message-chunks.rb
index 0606395052f4d7a4a467638da170019271f0df4c..cc895f3e480e591d077a18a83a84b85ca7d0cf5a 100644 (file)
@@ -116,7 +116,7 @@ EOS
     def initial_state; :open end
     def viewable?; @lines.nil? end
     def view_default! path
-      cmd = "/usr/bin/run-mailcap --action=view '#{@content_type}:#{path}' > /dev/null 2> /dev/null"
+      cmd = "/usr/bin/run-mailcap --action=view '#{@content_type}:#{path}' 2>/dev/null"
       Redwood::log "running: #{cmd.inspect}"
       system cmd
       $? == 0
@@ -126,7 +126,7 @@ EOS
       path = write_to_disk
       ret = HookManager.run "mime-view", :content_type => @content_type,
                                          :filename => path
-      view_default! path unless ret
+      ret || view_default!(path)
     end
 
     def write_to_disk
@@ -206,7 +206,7 @@ EOS
     def inlineable?; false end
     def quotable?; false end
     def expandable?; true end
-    def initial_state; :open end
+    def initial_state; :closed end
     def viewable?; false end
 
     def patina_color; :generic_notice_patina_color end