* filters: don't fail on filter update when filter file doesn't exist

This commit is contained in:
Simon Zolin 2019-10-23 14:19:43 +03:00
parent 15e6311c63
commit 0737354f53
1 changed files with 1 additions and 1 deletions

View File

@ -436,7 +436,7 @@ func (filter *filter) save() error {
func (filter *filter) saveAndBackupOld() error {
filterFilePath := filter.Path()
err := os.Rename(filterFilePath, filterFilePath+".old")
if err != nil {
if err != nil && !os.IsNotExist(err) {
return err
}
return filter.save()