[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sup-devel] [PATCH] Sync and update other threads when Maildir sync-back changes location.
From: "Edward Z. Yang" <ezyang@mit.edu>
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
---
lib/sup/maildir.rb | 2 +-
lib/sup/message.rb | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb
index 0c8c563..050cfaf 100644
--- a/lib/sup/maildir.rb
+++ b/lib/sup/maildir.rb
@@ -226,7 +226,7 @@ private
new_base = (flags.include?("S")) ? "cur" : "new"
md_base, md_ver, md_flags = maildir_data orig_path
- return orig_path if md_flags == flags
+ return if md_flags == flags
new_loc = File.join new_base, "#{md_base}:#{md_ver},#{flags}"
orig_path = File.join @dir, orig_path
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index 0616f75..cd9226e 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -288,7 +288,11 @@ EOS
def sync_back
@locations.each do |l|
if l.valid?
- l.sync_back @labels if $config[:sync_back_to_maildir] and l.source.is_a? Maildir
+ r = l.sync_back @labels if $config[:sync_back_to_maildir] and l.source.is_a? Maildir
+ if r
+ Index.sync_message self, true
+ UpdateManager.relay self, :updated, self
+ end
end
end
end
--
1.7.11.3
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel