Subject: Re: [sup-devel] [PATCH] fix crash in sup-sync if the default sent source is used

From: Rich Lane <[email-masked]>
Date: Mon, 12 Jul 2010 22:13:26 -0400

Applied to master.
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Sascha Silbe <[email-masked]>
Date: Thu, 8 Jul 2010 12:28:31 +0000

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 <[email-masked]>
---
 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