Subject: Re: [sup-devel] [PATCH] s/@filename/@path/ in MBox#store_message

From: Gaute Hope <[email-masked]>
Date: Sun, 10 Oct 2010 08:56:09 +0200

Excerpts from Adam Lloyd's message of 2010-10-10 00:11:21 +0200:
> This fixes issues 79 and 89, related to crashes on sending mail.

I think your best bet is to close them yourself (if patches applied),
the issue tracker don't seem to be horribly well-maintained ;)

- gaute

---

From: Adam Lloyd <[email-masked]>
Date: Sat, 09 Oct 2010 18:11:21 -0400

lib/sup/mbox.rb |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

@filename is undefined in MBox, so trying to store a message to an mbox
source results in a crash.  @path contains the needed information.

diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
--- a/lib/sup/mbox.rb
+++ b/lib/sup/mbox.rb
@@ -90,8 +90,8 @@
   end
 
   def store_message date, from_email, &block
-    need_blank = File.exists?(@filename) && !File.zero?(@filename)
-    File.open(@filename, "ab") do |f|
+    need_blank = File.exists?(@path) && !File.zero?(@path)
+    File.open(@path, "ab") do |f|
       f.puts if need_blank
       f.puts "From #{from_email} #{date.asctime}"
       yield f
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Rich Lane <[email-masked]>
Date: Sun, 10 Oct 2010 03:43:56 -0400

Applied to master.