Skip to content

Commit

Permalink
Pull request: filtering: fix filter delete
Browse files Browse the repository at this point in the history
Merge in DNS/adguard-home from 5700-fix-filter-delete to master

Squashed commit of the following:

commit 51e5c82
Merge: b4f8abd 37e046a
Author: Dimitry Kolyshev <[email protected]>
Date:   Thu Jun 22 17:05:23 2023 +0400

    Merge remote-tracking branch 'origin/master' into 5700-fix-filter-delete

commit b4f8abd
Merge: eac30a1 f40ef76
Author: Dimitry Kolyshev <[email protected]>
Date:   Thu Jun 22 16:55:58 2023 +0400

    Merge remote-tracking branch 'origin/master' into 5700-fix-filter-delete

commit eac30a1
Author: Dimitry Kolyshev <[email protected]>
Date:   Thu Jun 22 14:03:07 2023 +0400

    filtering: imp code

commit 4e27078
Author: Dimitry Kolyshev <[email protected]>
Date:   Thu Jun 22 14:02:04 2023 +0400

    all: docs

commit b818468
Author: Dimitry Kolyshev <[email protected]>
Date:   Thu Jun 22 13:18:12 2023 +0400

    filtering: fix filter delete
  • Loading branch information
Mizzick committed Jun 22, 2023
1 parent 37e046a commit 66345e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,15 @@ In this release, the schema version has changed from 20 to 21.

### Fixed

- The blocklists can now be deleted properly ([#5700]).
- Queries with the question-section target `.`, for example `NS .`, are now
counted in the statistics and correctly shown in the query log ([#5910]).
- Safe Search not working with `AAAA` queries for domains that don't have `AAAA`
records ([#5913]).

[#951]: https://github.com/AdguardTeam/AdGuardHome/issues/951
[#1577]: https://github.com/AdguardTeam/AdGuardHome/issues/1577
[#5700]: https://github.com/AdguardTeam/AdGuardHome/issues/5700
[#5910]: https://github.com/AdguardTeam/AdGuardHome/issues/5910
[#5913]: https://github.com/AdguardTeam/AdGuardHome/issues/5913

Expand Down
2 changes: 1 addition & 1 deletion internal/filtering/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (d *DNSFilter) handleFilteringRemoveURL(w http.ResponseWriter, r *http.Requ
deleted = (*filters)[delIdx]
p := deleted.Path(d.DataDir)
err = os.Rename(p, p+".old")
if err != nil {
if err != nil && !errors.Is(err, os.ErrNotExist) {
log.Error("deleting filter %d: renaming file %q: %s", deleted.ID, p, err)

return
Expand Down

0 comments on commit 66345e8

Please sign in to comment.