mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-16 18:38:52 -07:00
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 {
|
||||
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
Block a user