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:
parent
65fae93a81
commit
a413852627
1 changed files with 3 additions and 3 deletions
|
|
@ -631,16 +631,16 @@ nextAdvisory:
|
||||||
// Advisories that failed validation are store in a special folder.
|
// Advisories that failed validation are store in a special folder.
|
||||||
var newDir string
|
var newDir string
|
||||||
if valStatus != validValidationStatus {
|
if valStatus != validValidationStatus {
|
||||||
newDir = path.Join(d.cfg.Directory, failedValidationDir, lower)
|
newDir = path.Join(d.cfg.Directory, failedValidationDir)
|
||||||
} else {
|
} else {
|
||||||
newDir = path.Join(d.cfg.Directory, lower)
|
newDir = d.cfg.Directory
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do we have a configured destination folder?
|
// Do we have a configured destination folder?
|
||||||
if d.cfg.Folder != "" {
|
if d.cfg.Folder != "" {
|
||||||
newDir = path.Join(newDir, d.cfg.Folder)
|
newDir = path.Join(newDir, d.cfg.Folder)
|
||||||
} else {
|
} else {
|
||||||
newDir = path.Join(newDir, strconv.Itoa(initialReleaseDate.Year()))
|
newDir = path.Join(newDir, lower, strconv.Itoa(initialReleaseDate.Year()))
|
||||||
}
|
}
|
||||||
|
|
||||||
if newDir != lastDir {
|
if newDir != lastDir {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue