gmail-britta icon indicating copy to clipboard operation
gmail-britta copied to clipboard

Empty archive_unless_directed cause import errors

Open FiloSottile opened this issue 6 years ago • 1 comments

A clause like

    filter {
      has [FOO]
    }.archive_unless_directed

will still generate two filters, one for directed emails and one for not, but the latter one will be empty, causing an import error.

FiloSottile avatar Jun 14 '18 19:06 FiloSottile

Eeep, yes, that's a messy edge case. I think it would make sense in archive_unless_directed to check if the new filter is empty / identical to the base filter and not return a new one in that case (I don't have all the state swapped in at the moment, it might need some refactoring to let us not add a filter from this).

antifuchs avatar Jun 15 '18 10:06 antifuchs