Skip to content

Commit f68893e

Browse files
classabbyampDuncaen
authored andcommitted
lib/transaction_fetch.c: don't rely on digest being NULL
caused issues when .xbps existed locally but .sig2 did not.
1 parent 192fac7 commit f68893e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/transaction_fetch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ download_binpkg(struct xbps_handle *xhp, xbps_dictionary_t repo_pkgd)
159159
* If digest is not set, binary package was not downloaded,
160160
* i.e. 304 not modified, verify by file instead.
161161
*/
162-
if (*digest) {
162+
if (fetchLastErrCode == FETCH_UNCHANGED) {
163163
*sigsuffix = '\0';
164164
if (!xbps_verify_file_signature(repo, buf)) {
165165
rv = EPERM;

0 commit comments

Comments
 (0)