1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Downloader: Only add tlp label to path if no custom directory is configured. Refactor accordingly

This commit is contained in:
JanHoefelmeyer 2023-11-20 11:05:57 +01:00
parent 65fae93a81
commit a413852627

View file

@ -631,16 +631,16 @@ nextAdvisory:
// Advisories that failed validation are store in a special folder.
var newDir string
if valStatus != validValidationStatus {
newDir = path.Join(d.cfg.Directory, failedValidationDir, lower)
newDir = path.Join(d.cfg.Directory, failedValidationDir)
} else {
newDir = path.Join(d.cfg.Directory, lower)
newDir = d.cfg.Directory
}
// Do we have a configured destination folder?
if d.cfg.Folder != "" {
newDir = path.Join(newDir, d.cfg.Folder)
} else {
newDir = path.Join(newDir, strconv.Itoa(initialReleaseDate.Year()))
newDir = path.Join(newDir, lower, strconv.Itoa(initialReleaseDate.Year()))
}
if newDir != lastDir {