dload: don't download sig if package is found in cache

Avoids the segfault seen in FS#33911.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Dave Reisner 2013-02-17 21:55:00 -05:00 committed by Allan McRae
parent 63baba13ec
commit 3d142fe8ef

View file

@ -688,7 +688,7 @@ char SYMEXPORT *alpm_fetch_pkgurl(alpm_handle_t *handle, const char *url)
} }
/* attempt to download the signature */ /* attempt to download the signature */
if(ret == 0 && (handle->siglevel & ALPM_SIG_PACKAGE)) { if(ret == 0 && final_pkg_url && (handle->siglevel & ALPM_SIG_PACKAGE)) {
char *sig_filepath, *sig_final_file = NULL; char *sig_filepath, *sig_final_file = NULL;
size_t len; size_t len;