From dd0be44e81bb19efde9113224ee998739ff3717b Mon Sep 17 00:00:00 2001 From: JanHoefelmeyer Date: Mon, 20 Mar 2023 08:27:07 +0100 Subject: [PATCH] Make Aggregator ignore set lockfile if NoLock option is set to true --- cmd/csaf_aggregator/config.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/csaf_aggregator/config.go b/cmd/csaf_aggregator/config.go index 7843f73..57461e9 100644 --- a/cmd/csaf_aggregator/config.go +++ b/cmd/csaf_aggregator/config.go @@ -267,8 +267,10 @@ func (c *config) setDefaults() { c.Domain = defaultDomain } - if !c.NoLock && c.LockFile == nil { - c.LockFile = &defaultLockFile + if c.NoLock { + c.LockFile = nil + } else if c.LockFile == nil { + c.LockFile = &defautLockFile } if c.Workers <= 0 {