notmuch restore: only delete a message's old tags if they are not a subset of the new ones.

This commit is contained in:
Sebastian Spaeth 2010-03-19 09:39:23 +01:00
parent 7739b6e469
commit cd109ef559

View file

@ -235,7 +235,8 @@ if __name__ == '__main__':
#set the new tags
msg.freeze()
msg.remove_all_tags()
#only remove tags if the new ones are not a superset anyway
if not (new_tags > old_tags): msg.remove_all_tags()
for tag in new_tags: msg.add_tag(tag)
msg.thaw()