Merge: * filters: don't fail on filter update when filter file doesn't exist
Close #1112 * commit '0737354f534385c3c2036e15d65554bcb7090fb4': * filters: don't fail on filter update when filter file doesn't exist
This commit is contained in:
commit
9d29fdea4b
|
@ -436,7 +436,7 @@ func (filter *filter) save() error {
|
||||||
func (filter *filter) saveAndBackupOld() error {
|
func (filter *filter) saveAndBackupOld() error {
|
||||||
filterFilePath := filter.Path()
|
filterFilePath := filter.Path()
|
||||||
err := os.Rename(filterFilePath, filterFilePath+".old")
|
err := os.Rename(filterFilePath, filterFilePath+".old")
|
||||||
if err != nil {
|
if err != nil && !os.IsNotExist(err) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return filter.save()
|
return filter.save()
|
||||||
|
|
Loading…
Reference in New Issue