mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Save global config after import
This commit is contained in:
parent
b76a860718
commit
82cdd1b419
3 changed files with 9 additions and 1 deletions
2
go.mod
2
go.mod
|
@ -27,7 +27,7 @@ require (
|
|||
github.com/mitchellh/go-server-timing v1.0.1
|
||||
github.com/oschwald/maxminddb-golang v1.12.0
|
||||
github.com/safing/jess v0.3.2
|
||||
github.com/safing/portbase v0.18.6
|
||||
github.com/safing/portbase v0.18.7-0.20231218160927-7631b9d28afe
|
||||
github.com/safing/portmaster-android/go v0.0.0-20230830120134-3226ceac3bec
|
||||
github.com/safing/spn v0.7.4
|
||||
github.com/shirou/gopsutil v3.21.11+incompatible
|
||||
|
|
2
go.sum
2
go.sum
|
@ -211,6 +211,8 @@ github.com/safing/jess v0.3.2 h1:d21+sautJlfTKcwgm6/TohUf0F8DL27Lug2XHBOBqvY=
|
|||
github.com/safing/jess v0.3.2/go.mod h1:N1Qiw9YBDHSVilocPEWHoGIEi+DvtmGds76rUhAyctU=
|
||||
github.com/safing/portbase v0.18.6 h1:uMZOG4C0K61QJE7I4fI+55r1I/eV42TJdI1xA02U1yo=
|
||||
github.com/safing/portbase v0.18.6/go.mod h1:qhhLjrr5iEGU9r7RZ6hJdtulOeycJ0d0jq95ZxGJ9Hs=
|
||||
github.com/safing/portbase v0.18.7-0.20231218160927-7631b9d28afe h1:JphzTgtBrWwdS4i8g8TJByv8fV1zDvsdh0irf5bx2uQ=
|
||||
github.com/safing/portbase v0.18.7-0.20231218160927-7631b9d28afe/go.mod h1:qhhLjrr5iEGU9r7RZ6hJdtulOeycJ0d0jq95ZxGJ9Hs=
|
||||
github.com/safing/portmaster-android/go v0.0.0-20230830120134-3226ceac3bec h1:oSJY1seobofPwpMoJRkCgXnTwfiQWNfGMCPDfqgAEfg=
|
||||
github.com/safing/portmaster-android/go v0.0.0-20230830120134-3226ceac3bec/go.mod h1:abwyAQrZGemWbSh/aCD9nnkp0SvFFf/mGWkAbOwPnFE=
|
||||
github.com/safing/spn v0.7.4 h1:wAE17yWOgL/lEwluRXRj1gM08bhyg1f7GQHKuP3aNSw=
|
||||
|
|
|
@ -254,6 +254,12 @@ func ImportSettings(r *SettingsImportRequest) (*ImportResult, error) {
|
|||
)
|
||||
}
|
||||
|
||||
// Save new config to disk.
|
||||
err := config.SaveConfig()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to save config: %w", err)
|
||||
}
|
||||
|
||||
result.RestartRequired = restartRequired
|
||||
return result, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue