commit 9be79c3141bd56bf8af0c6c877d51b9ae0911b83
parent 37c5da0a9411a7192a674c4b9832c68e9b5fcc15
Author: Sascha Silbe <sascha-pgp@silbe.org>
Date: Thu, 8 Jul 2010 12:28:31 +0000
fix crash in sup-sync if the default sent source is used
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
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git 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?