From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.204.141.209 with SMTP id n17cs181684bku; Thu, 8 Jul 2010 05:47:43 -0700 (PDT) Received: by 10.220.59.202 with SMTP id m10mr4245303vch.23.1278593261629; Thu, 08 Jul 2010 05:47:41 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id e7si5637497vcf.62.2010.07.08.05.47.41; Thu, 08 Jul 2010 05:47:41 -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 C11A31858388 for ; Thu, 8 Jul 2010 08:47:40 -0400 (EDT) Received: from smtp.chost.de (setoy.chost.de [217.160.209.225]) by rubyforge.org (Postfix) with ESMTP id C980C185837C for ; Thu, 8 Jul 2010 08:28:47 -0400 (EDT) Received: (qmail 12762 invoked by uid 5015); 8 Jul 2010 12:28:52 -0000 Received: (nullmailer pid 31954 invoked by uid 123); Thu, 08 Jul 2010 12:28:46 -0000 Received: from xo15-sascha.sascha.silbe.org (xo15-sascha.sascha.silbe.org [192.168.1.223]) by flatty.sascha.silbe.org ([192.168.1.252]) with SMTP via TCP; 08 Jul 2010 12:28:46 -0000 Received: (nullmailer pid 686 invoked by uid 8193); Thu, 08 Jul 2010 12:28:44 -0000 From: Sascha Silbe To: sup-devel Date: Thu, 8 Jul 2010 12:28:31 +0000 Message-Id: <1278592111-654-1-git-send-email-sascha-pgp@silbe.org> X-Mailer: git-send-email 1.7.1 Mail-Followup-To: Subject: [sup-devel] [PATCH] fix crash in sup-sync if the default sent source is used X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sascha Silbe , Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org This fixes a crash in sup-sync when syncing a folder that contains a copy of a "sent" message and no "sent" folder has been explicitly configured in the config file (so it hasn't been added to sources.yaml). Signed-off-by: Sascha Silbe --- bin/sup-sync | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/bin/sup-sync b/bin/sup-sync index 6eb8f80..7fb2a87 100755 --- a/bin/sup-sync +++ b/bin/sup-sync @@ -116,6 +116,12 @@ index.lock_interactively or exit begin index.load + if(s = Redwood::SourceManager.source_for Redwood::SentManager.source_uri) + Redwood::SentManager.source = s + else + Redwood::SourceManager.add_source Redwood::SentManager.default_source + end + sources = if opts[:all_sources] Redwood::SourceManager.sources elsif ARGV.empty? -- 1.7.1 _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel