Skip to content

Commit

Permalink
Downloader: Only add tlp label to path if no custom directory is conf…
Browse files Browse the repository at this point in the history
…igured. Refactor accordingly
  • Loading branch information
JanHoefelmeyer committed Nov 20, 2023
1 parent 65fae93 commit a413852
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/csaf_downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a413852

Please sign in to comment.