From: William Morgan Date: Thu, 24 Jan 2008 23:09:28 +0000 (-0800) Subject: properly escape filenames in call to run-mailcap X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=479ebb3fc2cbdd99d7f5e1681644584249e5491d;p=sup properly escape filenames in call to run-mailcap Otherwise, filenames with spaces never work. --- diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index 8e5def9..7995290 100644 --- a/lib/sup/message-chunks.rb +++ b/lib/sup/message-chunks.rb @@ -116,7 +116,7 @@ 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" + system "/usr/bin/run-mailcap --action=view '#{@content_type}:#{path}' > /dev/null 2> /dev/null" $? == 0 end