mirror of
https://github.com/safing/portmaster
synced 2025-09-02 10:39:22 +00:00
Merge pull request #1845 from safing/fix/generated-index-version
Use the current binary version for the generated index
This commit is contained in:
commit
b320ac24fb
1 changed files with 4 additions and 1 deletions
|
@ -14,6 +14,7 @@ import (
|
||||||
"github.com/tevino/abool"
|
"github.com/tevino/abool"
|
||||||
|
|
||||||
"github.com/safing/jess"
|
"github.com/safing/jess"
|
||||||
|
"github.com/safing/portmaster/base/info"
|
||||||
"github.com/safing/portmaster/base/log"
|
"github.com/safing/portmaster/base/log"
|
||||||
"github.com/safing/portmaster/base/notifications"
|
"github.com/safing/portmaster/base/notifications"
|
||||||
"github.com/safing/portmaster/service/mgr"
|
"github.com/safing/portmaster/service/mgr"
|
||||||
|
@ -192,7 +193,9 @@ func New(instance instance, name string, cfg Config) (*Updater, error) {
|
||||||
log.Errorf("updates/%s: invalid index file, falling back to dir scan: %s", cfg.Name, err)
|
log.Errorf("updates/%s: invalid index file, falling back to dir scan: %s", cfg.Name, err)
|
||||||
module.corruptedInstallation = fmt.Errorf("invalid index: %w", err)
|
module.corruptedInstallation = fmt.Errorf("invalid index: %w", err)
|
||||||
}
|
}
|
||||||
index, err = GenerateIndexFromDir(cfg.Directory, IndexScanConfig{Version: "0.0.0"})
|
index, err = GenerateIndexFromDir(cfg.Directory, IndexScanConfig{
|
||||||
|
Version: info.VersionNumber(),
|
||||||
|
})
|
||||||
if err == nil && index.init(currentPlatform) == nil {
|
if err == nil && index.init(currentPlatform) == nil {
|
||||||
module.index = index
|
module.index = index
|
||||||
return module, nil
|
return module, nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue