]> git.cworth.org Git - sup/blobdiff - lib/sup/message-chunks.rb
make 'm' (compose) in thread-view-mode prompt for a to: address with a default
[sup] / lib / sup / message-chunks.rb
index 8e5def9eaaeecffabe2f62c90b1418b242460da6..ba8b84641f294d3820896ddb53f06dd2169c76b9 100644 (file)
@@ -116,7 +116,9 @@ EOS
     def initial_state; :open end
     def viewable?; @lines.nil? end
     def view_default! path
-      system "/usr/bin/run-mailcap --action=view #{@content_type}:#{path} > /dev/null 2> /dev/null"
+      cmd = "/usr/bin/run-mailcap --action=view '#{@content_type}:#{path}' > /dev/null 2> /dev/null"
+      Redwood::log "running: #{cmd.inspect}"
+      system cmd
       $? == 0
     end
 
@@ -124,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