From 36633ec11a20342563cfd28c61daa5415caf4bd8 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Tue, 4 Nov 2025 13:52:23 +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 62854f9a3..d84525a96 100644 --- a/ees/filecsv.go +++ b/ees/filecsv.go @@ -66,9 +66,7 @@ func (fCsv *FileCSVee) init(wrtr io.WriteCloser) (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.cfg.ExportPath == utils.MetaBuffer { fCsv.wrtr = wrtr } else if fCsv.wrtr, err = os.Create(filePath); err != nil { diff --git a/ees/filefwv.go b/ees/filefwv.go index 1926a7d98..7a82609a9 100644 --- a/ees/filefwv.go +++ b/ees/filefwv.go @@ -60,9 +60,7 @@ type FileFWVee struct { func (fFwv *FileFWVee) init(writer io.Writer) (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.cfg.ExportPath == utils.MetaBuffer { fFwv.writer = &buffer{writer}