mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Ensure that interims.csv is deleted as soon as the last entry is removed from it.
This commit is contained in:
parent
00a0fb68d2
commit
bdb24e72ab
1 changed files with 8 additions and 10 deletions
|
|
@ -221,16 +221,14 @@ func (w *worker) interimWork(wg *sync.WaitGroup, jobs <-chan *interimJob) {
|
||||||
// a greater interims interval later.
|
// a greater interims interval later.
|
||||||
notFinalized = append(notFinalized, olds...)
|
notFinalized = append(notFinalized, olds...)
|
||||||
|
|
||||||
if len(notFinalized) > 0 {
|
// We want to write in the transaction folder.
|
||||||
// We want to write in the transaction folder.
|
dst, err := tx.Dst()
|
||||||
dst, err := tx.Dst()
|
if err != nil {
|
||||||
if err != nil {
|
return err
|
||||||
return err
|
}
|
||||||
}
|
ninterCSV := filepath.Join(dst, label, interimsCSV)
|
||||||
interCSV := filepath.Join(dst, label, interimsCSV)
|
if err := writeInterims(ninterCSV, notFinalized); err != nil {
|
||||||
if err := writeInterims(interCSV, notFinalized); err != nil {
|
return err
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tx.commit()
|
return tx.commit()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue