Subject: [sup-talk] [PATCH] Handle a nil 'default_attachment_save_dir' option

From: [email-masked] (Nicolas Pouillard)
Date: Mon, 16 Mar 2009 19:56:44 +0100

Resent...

---
 lib/sup/modes/thread-view-mode.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
index ce9f13d..a2d6eb4 100644
--- a/lib/sup/modes/thread-view-mode.rb
+++ b/lib/sup/modes/thread-view-mode.rb
@@ -260,7 +260,7 @@ EOS
     chunk = @chunk_lines[curpos] or return
     case chunk
     when Chunk::Attachment
-      fn = BufferManager.ask_for_filename :filename, "Save attachment to file: ", ($config[:default_attachment_save_dir] + chunk.filename)
+      fn = BufferManager.ask_for_filename(:filename, "Save attachment to file: ", ($config[:default_attachment_save_dir] || '') + chunk.filename)
       save_to_file(fn) { |f| f.print chunk.raw_content } if fn
     else
       m = @message_lines[curpos]

-- 
Nicolas Pouillard