Fix error when downloading signature file for an existing package file
If a package was already downloaded but its signature file was not, pacman would download the signature then error out despite all files being present. Also fixes a similar error when some, but not all, package databases were updated with -Sy. Fixes #156 Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
b60b779fc8
commit
c9acfc2b50
1 changed files with 4 additions and 1 deletions
|
@ -1108,7 +1108,10 @@ static int finalize_download_locations(alpm_list_t *payloads, const char *localp
|
||||||
int ret = move_file(payload->destfile_name, localpath);
|
int ret = move_file(payload->destfile_name, localpath);
|
||||||
|
|
||||||
if(ret == -1) {
|
if(ret == -1) {
|
||||||
returnvalue = -1;
|
/* ignore error if the file already existed - only signature file was downloaded */
|
||||||
|
if(payload->mtime_existing_file == 0) {
|
||||||
|
returnvalue = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (payload->download_signature) {
|
if (payload->download_signature) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue