From 98a26cf7993745ba185f4b4e3852135188460ada Mon Sep 17 00:00:00 2001 From: Rich Lane Date: Sun, 23 Aug 2009 11:36:59 -0700 Subject: [PATCH] sup-sync: restore state on messages that don't already exist --- bin/sup-sync | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/sup-sync b/bin/sup-sync index 2aa00c3..003a72d 100755 --- a/bin/sup-sync +++ b/bin/sup-sync @@ -174,7 +174,12 @@ begin ## decide what to do based on message labels and the operation we're performing dothis, new_labels = case when (op == :restore) && restored_state[m.id] && old_m && (old_m.labels != restored_state[m.id]) + num_restored += 1 [:update_message_state, restored_state[m.id]] + when (op == :restore) && restored_state[m.id] && !old_m + num_restored += 1 + m.labels = restored_state[m.id] + :add_message when op == :discard if old_m && (old_m.labels != m.labels) [:update_message_state, m.labels] -- 2.43.0