From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.58.247.3 with SMTP id ya3csp566298vec; Tue, 21 Aug 2012 12:20:17 -0700 (PDT) Received: by 10.60.30.195 with SMTP id u3mr13512799oeh.80.1345576817083; Tue, 21 Aug 2012 12:20:17 -0700 (PDT) Return-Path: Received: from rubyforge.org (50-56-192-79.static.cloud-ips.com. [50.56.192.79]) by mx.google.com with ESMTP id im8si2083703obb.148.2012.08.21.12.20.16; Tue, 21 Aug 2012 12:20:17 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) client-ip=50.56.192.79; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id B15732E076; Tue, 21 Aug 2012 19:20:16 +0000 (UTC) Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU [18.9.25.15]) by rubyforge.org (Postfix) with ESMTP id D1B202E060 for ; Tue, 21 Aug 2012 19:20:03 +0000 (UTC) X-AuditID: 1209190f-b7f306d0000008b4-62-5033df634d1d Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP id 15.22.02228.36FD3305; Tue, 21 Aug 2012 15:20:03 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q7LJK3gS022178; Tue, 21 Aug 2012 15:20:03 -0400 Received: from localhost ([64.119.153.34]) (authenticated bits=0) (User authenticated as ezyang@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q7LJK1bg004567; Tue, 21 Aug 2012 15:20:02 -0400 (EDT) From: "Edward Z. Yang" To: damien.leone@fensalir.fr Date: Tue, 21 Aug 2012 15:19:56 -0400 Message-Id: <1345576796-31445-1-git-send-email-ezyang@mit.edu> X-Mailer: git-send-email 1.7.11.3 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprBIsWRmVeSWpSXmKPExsUixG6nopt83zjA4N4afotX5/uYLB5P38Pu wOQx7ddKJo99+yYyBzBFcdmkpOZklqUW6dslcGVcudPGVNDEVbH+yiTGBsZL7F2MnBwSAiYS 99onsEHYYhIX7q0Hsrk4hAT2MUr82v6DCcLZwCgxeU4XI0iVkMAzRokL2wNBbDYBdYlHx56y gtgiAjISn34vA7OZBewk1q9bygxiCwuES/xs+Qq2jUVAVWLS5MlMIDYvUM3tlSugrlCU+PF9 DfMERp4FjAyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdE30cjNL9FJTSjcxggKAU5J/B+O3g0qH GAU4GJV4eF9MMQoQYk0sK67MPcQoycGkJMqbc9s4QIgvKT+lMiOxOCO+qDQntfgQowQHs5II b9FkoBxvSmJlVWpRPkxKmoNFSZz3aspNfyGB9MSS1OzU1ILUIpisDAeHkgTv9ntAjYJFqemp FWmZOSUIaSYOTpDhPEDDJ4HU8BYXJOYWZ6ZD5E8xKkqJ87aBJARAEhmleXC9sAh9xSgO9Iow 72yQKh5gdMN1vwIazAQ0WO0q2OCSRISUVAOj2I9DfrWc4Rv/N3yzKmkIXJ2hb+JRV9zm0r52 97WsQMGTvFnuLp8/KM+4W2/9mqmwYVX90rXZs3gzzrBvE36SIxscffWdi7wG/5r20zG8Cxwa V059KP3Eafd7NW+NTbO3yV1NNOj4nFu021B5/YxF/KYnFXdXeqi/9v5f9bIoc5VtHZPYPB0l luKMREMt5qLiRAA1ydm2qwIAAA== Cc: sup-devel@rubyforge.org Subject: [sup-devel] [PATCH] Sync and update other threads when Maildir sync-back changes location. X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org From: "Edward Z. Yang" Signed-off-by: Edward Z. Yang --- 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