stevespringett / nist-data-mirror

A simple Java command-line utility to mirror the CVE JSON data from NIST.
Apache License 2.0
206 stars 93 forks source link

fixes #39 by downloading to a temporary directory #45

Open ghost opened 5 years ago

ghost commented 5 years ago

To prevent overwriting files downloaded earlier, download into a temporary directory. Only if the complete download was successful, move the files to the target directory.

stevespringett commented 5 years ago

This needs resolved

ghost commented 5 years ago

If I undestand the existing code correctly, the .meta file is used to check if a download is needed:

before = readLocalMetaForURL(cveBaseMetaUrl);

Since my PR ignores the existing .meta files, it downloads files that don't have to be downloaded. I think I will have to rework the logic of this branch before it can be merged.