lib/transaction_fetch.c: don't rely on digest being NULL

caused issues when .xbps existed locally but .sig2 did not.
This commit is contained in:
classabbyamp 2023-08-15 16:42:33 -04:00 committed by Duncan Overbruck
parent 192fac7cfd
commit f68893ec9a

View File

@ -159,7 +159,7 @@ download_binpkg(struct xbps_handle *xhp, xbps_dictionary_t repo_pkgd)
* If digest is not set, binary package was not downloaded,
* i.e. 304 not modified, verify by file instead.
*/
if (*digest) {
if (fetchLastErrCode == FETCH_UNCHANGED) {
*sigsuffix = '\0';
if (!xbps_verify_file_signature(repo, buf)) {
rv = EPERM;