* filters: don't fail on filter update when filter file doesn't exist
This commit is contained in:
parent
15e6311c63
commit
0737354f53
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue