]> git.cworth.org Git - sup/commitdiff
bugfix: draft loader not being detected properly by bin/sup
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 2 Nov 2007 23:03:49 +0000 (23:03 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Fri, 2 Nov 2007 23:03:49 +0000 (23:03 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@664 5c8cc53c-5e98-4d25-b20a-d8db53a31250

bin/sup
lib/sup/draft.rb

diff --git a/bin/sup b/bin/sup
index 6eabf56a9ea044be72022f3925fa6c867a5e34f4..d9e542c43ccd26001f96e239ed69b352ca330b40 100644 (file)
--- a/bin/sup
+++ b/bin/sup
@@ -99,12 +99,14 @@ begin
   if(s = Index.source_for DraftManager.source_name)
     DraftManager.source = s
   else
+    Redwood::log "no draft source, auto-adding..."
     Index.add_source DraftManager.new_source
   end
 
   if(s = Index.source_for SentManager.source_name)
     SentManager.source = s
   else
+    Redwood::log "no sent mail source, auto-adding..."
     Index.add_source SentManager.new_source
   end
 
index d5d61ee9ea7b6fd401e90fe5ac3a329d8a34b982..5db89fdcf55fea240f57b09eb4969f71e8771dbb 100644 (file)
@@ -47,7 +47,7 @@ class DraftLoader < Source
   def initialize cur_offset=0
     dir = Redwood::DRAFT_DIR
     Dir.mkdir dir unless File.exists? dir
-    super "draft://#{dir}", cur_offset, true, false
+    super DraftManager.source_name, cur_offset, true, false
     @dir = dir
   end