jessfraz / gmailfilters

A tool to sync Gmail filters from a config file to your account.
MIT License
548 stars 34 forks source link

export: ignore filters with empty action #9

Open anisse opened 5 years ago

anisse commented 5 years ago

I must have created a filter with a label, then deleted the label, and the filter was left with no action. Handle this case to prevent a crash at when Action is nil and dereferenced.

Signed-off-by: Anisse Astier anisse@astier.eu

parkr commented 5 years ago

Interestingly, exporting showed a number of these in the resulting config:

[[Filter]]
Query = ""
Archive = false
Read = false
Delete = false
ToMe = false
ArchiveUnlessToMe = false
Label = ""
ForwardTo = ""
crossan007 commented 5 years ago

I too have a large number of the above mentioned block in my export. I suspect, but have not yet fully proven #11 as the cause.