* [sup-devel] [PATCH] s/@filename/@path/ in MBox#store_message
@ 2010-10-09 22:11 Adam Lloyd
2010-10-10 6:56 ` Gaute Hope
2010-10-10 7:43 ` Rich Lane
0 siblings, 2 replies; 4+ messages in thread
From: Adam Lloyd @ 2010-10-09 22:11 UTC (permalink / raw)
To: sup-devel; +Cc: rlane
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [sup-devel] [PATCH] s/@filename/@path/ in MBox#store_message
@ 2010-08-17 1:18 Adam Lloyd
0 siblings, 0 replies; 4+ messages in thread
From: Adam Lloyd @ 2010-08-17 1:18 UTC (permalink / raw)
To: sup-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-10 7:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-09 22:11 [sup-devel] [PATCH] s/@filename/@path/ in MBox#store_message Adam Lloyd
2010-10-10 6:56 ` Gaute Hope
2010-10-10 7:43 ` Rich Lane
-- strict thread matches above, loose matches on Subject: below --
2010-08-17 1:18 Adam Lloyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox