fix nvd path

1. stop clair, not del nvd xml
This commit is contained in:
honglichang(常红立) 2018-07-17 20:11:24 +08:00
parent 9a9b1f7a13
commit 0d5f300c5b

View File

@ -26,6 +26,7 @@ import (
"io/ioutil"
"net/http"
"os"
"path/filepath"
"strconv"
"strings"
"time"
@ -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.