Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] [PATCH] fix crash in sup-dump if the default sent source is used
@ 2010-06-29  8:12 Sascha Silbe
  2010-07-03  2:31 ` Rich Lane
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Silbe @ 2010-06-29  8:12 UTC (permalink / raw)
  To: sup-devel

This fixes a crash in sup-dump if the index contains 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 <sascha-pgp@silbe.org>
---
 bin/sup-dump |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/bin/sup-dump b/bin/sup-dump
index d6a06e4..953b6e5 100755
--- a/bin/sup-dump
+++ b/bin/sup-dump
@@ -19,9 +19,16 @@ Usage:
 EOS
 end
 
+$config = Redwood::load_config Redwood::CONFIG_FN
 index = Redwood::Index.init
 Redwood::SourceManager.init
 index.load
+Redwood::SentManager.init $config[:sent_source] || 'sup://sent'
+if(s = Redwood::SourceManager.source_for Redwood::SentManager.source_uri)
+  Redwood::SentManager.source = s
+else
+  Redwood::SourceManager.add_source Redwood::SentManager.default_source
+end
 
 index.each_message :load_spam => true, :load_deleted => true, :load_killed => true do |m|
   puts "#{m.id} (#{m.labels.to_a.sort_by { |l| l.to_s } * ' '})"
-- 
1.6.5

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sup-devel] [PATCH] fix crash in sup-dump if the default sent source is used
  2010-06-29  8:12 [sup-devel] [PATCH] fix crash in sup-dump if the default sent source is used Sascha Silbe
@ 2010-07-03  2:31 ` Rich Lane
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Lane @ 2010-07-03  2:31 UTC (permalink / raw)
  To: Sascha Silbe; +Cc: sup-devel

Applied to master.
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-03  2:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-29  8:12 [sup-devel] [PATCH] fix crash in sup-dump if the default sent source is used Sascha Silbe
2010-07-03  2:31 ` Rich Lane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox