lib/sup/modes/edit-message-mode.rb in sup-0.9.1 vs lib/sup/modes/edit-message-mode.rb in sup-0.10
- old
+ new
@@ -160,11 +160,13 @@
def attach_file
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}"
end
end