From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.204.20.129 with SMTP id f1cs29843bkb; Sat, 9 Oct 2010 15:34:08 -0700 (PDT) Received: by 10.231.30.76 with SMTP id t12mr3401532ibc.161.1286663646890; Sat, 09 Oct 2010 15:34:06 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id p11si13385801ibd.73.2010.10.09.15.34.06; Sat, 09 Oct 2010 15:34:06 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 2434A1858377; Sat, 9 Oct 2010 18:34:06 -0400 (EDT) Received: from mail-vw0-f50.google.com (mail-vw0-f50.google.com [209.85.212.50]) by rubyforge.org (Postfix) with ESMTP id 03414185835E for ; Sat, 9 Oct 2010 18:11:56 -0400 (EDT) Received: by vws17 with SMTP id 17so1080100vws.23 for ; Sat, 09 Oct 2010 15:11:56 -0700 (PDT) Received: by 10.220.169.16 with SMTP id w16mr1284545vcy.31.1286662316735; Sat, 09 Oct 2010 15:11:56 -0700 (PDT) Received: from nagato.alloy-d.net (pool-71-125-132-193.cmdnnj.east.verizon.net [71.125.132.193]) by mx.google.com with ESMTPS id k15sm1713210vcs.29.2010.10.09.15.11.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 09 Oct 2010 15:11:55 -0700 (PDT) Received: from adam by nagato.alloy-d.net with local (Exim 4.72) (envelope-from ) id 1P4he4-0001Ri-Fv; Sat, 09 Oct 2010 18:12:00 -0400 MIME-Version: 1.0 X-Mercurial-Node: a53ff2538f3de566eeccc2b87210e9f254536d38 Message-Id: User-Agent: Mercurial-patchbomb/1.6.4 Date: Sat, 09 Oct 2010 18:11:21 -0400 From: Adam Lloyd To: sup-devel@rubyforge.org Cc: rlane@club.cc.umd.edu Subject: [sup-devel] [PATCH] s/@filename/@path/ in MBox#store_message X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org 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