From: Adam Lloyd <adam@alloy-d.net>
To: sup-devel@rubyforge.org
Subject: [sup-devel] [PATCH] s/@filename/@path/ in MBox#store_message
Date: Mon, 16 Aug 2010 21:18:43 -0400 [thread overview]
Message-ID: <b0b250b7da6262f6fe11.1282007923@nagato.alloy-d.net> (raw)
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.
This fixes issues 79 and 89, related to crashes on sending mail.
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
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
next reply other threads:[~2010-08-17 1:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 1:18 Adam Lloyd [this message]
2010-10-09 22:11 Adam Lloyd
2010-10-10 6:56 ` Gaute Hope
2010-10-10 7:43 ` Rich Lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b0b250b7da6262f6fe11.1282007923@nagato.alloy-d.net \
--to=adam@alloy-d.net \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox