]> git.cworth.org Git - sup/commitdiff
properly escape filenames in call to run-mailcap
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Thu, 24 Jan 2008 23:09:28 +0000 (15:09 -0800)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Thu, 24 Jan 2008 23:09:28 +0000 (15:09 -0800)
Otherwise, filenames with spaces never work.

lib/sup/message-chunks.rb

index 8e5def9eaaeecffabe2f62c90b1418b242460da6..799529052501334f90f787c2ddc7044725f61875 100644 (file)
@@ -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