Skip to content

Commit

Permalink
Merge pull request #574 from hongli-my/fix-nvd-path
Browse files Browse the repository at this point in the history
not use path.Join,  stop clair, left  nvd xml like nvd-data3260521972007.xml
  • Loading branch information
jzelinskie authored Jul 17, 2018
2 parents 9a9b1f7 + 0d5f300 commit 3babbaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/vulnmdsrc/nvd/nvd.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"io/ioutil"
"net/http"
"os"
"path/filepath"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -146,7 +147,7 @@ func getDataFeeds(dataFeedHashes map[string]string, localPath string) (map[strin
// Create io.Reader for every data feed.
dataFeedReaders := make(map[string]NestedReadCloser)
for _, dataFeedName := range dataFeedNames {
fileName := localPath + dataFeedName + ".xml"
fileName := filepath.Join(localPath, fmt.Sprintf("%s.xml", dataFeedName))

if h, ok := dataFeedHashes[dataFeedName]; ok && h == dataFeedHashes[dataFeedName] {
// The hash is known, the disk should contains the feed. Try to read from it.
Expand Down

0 comments on commit 3babbaf

Please sign in to comment.