sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 18011b2fcb7f1fff9a13337cb2852370a5de20a5
parent bfe40c05dc6dc2656a4dde11948ff617f2fa00d6
Author: Michael Stapelberg <michael@stapelberg.de>
Date:   Wed, 30 Sep 2009 22:41:19 +0200

when providing a wildcard as file for an attachment, correctly expand it

Diffstat:
M lib/sup/modes/edit-message-mode.rb | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
@@ -162,8 +162,10 @@ EOS
     fn = BufferManager.ask_for_filename :attachment, "File name (enter for browser): "
     return unless fn
     begin
-      @attachments << RMail::Message.make_file_attachment(fn)
-      @attachment_names << fn
+      Dir[fn].each do |f|
+        @attachments << RMail::Message.make_file_attachment(f)
+        @attachment_names << f
+      end
       update
     rescue SystemCallError => e
       BufferManager.flash "Can't read #{fn}: #{e.message}"