From e1c154b9e03c615ab162f131cdff8b43ff02d1e8 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Fri, 14 Mar 2025 20:08:16 +0200 Subject: [PATCH] use Set method to update ExportPath for csv/fwv ee prevents manual locking --- ees/filecsv.go | 4 +--- ees/filefwv.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ees/filecsv.go b/ees/filecsv.go index f3697cd4e..e1de88ee7 100644 --- a/ees/filecsv.go +++ b/ees/filecsv.go @@ -65,9 +65,7 @@ func (fCsv *FileCSVee) init() (err error) { // create the file filePath := path.Join(fCsv.Cfg().ExportPath, fCsv.Cfg().ID+utils.Underline+utils.UUIDSha1Prefix()+utils.CSVSuffix) - fCsv.dc.Lock() - fCsv.dc.MapStorage[utils.ExportPath] = filePath - fCsv.dc.Unlock() + fCsv.dc.Set([]string{utils.ExportPath}, filePath) if fCsv.file, err = os.Create(filePath); err != nil { return } diff --git a/ees/filefwv.go b/ees/filefwv.go index 1ce58ba62..d1fe39092 100644 --- a/ees/filefwv.go +++ b/ees/filefwv.go @@ -59,9 +59,7 @@ type FileFWVee struct { func (fFwv *FileFWVee) init() (err error) { filePath := path.Join(fFwv.Cfg().ExportPath, fFwv.Cfg().ID+utils.Underline+utils.UUIDSha1Prefix()+utils.FWVSuffix) - fFwv.dc.Lock() - fFwv.dc.MapStorage[utils.ExportPath] = filePath - fFwv.dc.Unlock() + fFwv.dc.Set([]string{utils.ExportPath}, filePath) // create the file if fFwv.file, err = os.Create(filePath); err != nil { return