Cisco-Talos / cvdupdate

ClamAV Private Database Mirror Updater Tool
Apache License 2.0
93 stars 35 forks source link

Fix download of cdiff in addition to cvd on first download #48

Closed micahsnyder closed 2 years ago

micahsnyder commented 2 years ago

The first time you run cvd update it should download the cvd's and also the latest cdiff for each. This isn't happening and it is only downloading cdiff's when updating cvd's.

This commit fixes the issue by reverting to the old way of downloading the initial cvd that includes cdiff's and doesn't just download the one file. The way that had been added in 1.1.0 was to ensure that the file is downloaded if it had been accidentally deleted or moved locally. So to keep that improvement, this patch also adds a check if the database doesn't exist, so and if so it will reset the local version to zero which will force an update of the database.

Fixes https://github.com/Cisco-Talos/cvdupdate/issues/45