[WIP] updater rafactoring, minor improvments

This commit is contained in:
Vladimir Stoilov
2024-09-17 12:36:44 +03:00
parent 83ec18f552
commit 84a15b5fb3
18 changed files with 380 additions and 310 deletions

View File

@@ -16,7 +16,7 @@ import (
"github.com/safing/portmaster/base/api"
"github.com/safing/portmaster/base/log"
"github.com/safing/portmaster/base/utils"
"github.com/safing/portmaster/service/updates/registry"
"github.com/safing/portmaster/service/updates"
)
var (
@@ -93,7 +93,7 @@ func (bs *archiveServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// get file from update system
zipFile, err := module.instance.BinaryUpdates().GetFile(fmt.Sprintf("%s.zip", moduleName))
if err != nil {
if errors.Is(err, registry.ErrNotFound) {
if errors.Is(err, updates.ErrNotFound) {
log.Tracef("ui: requested module %s does not exist", moduleName)
http.Error(w, err.Error(), http.StatusNotFound)
} else {