FS#66472: Remove *.sig file if package corrupted
In case if a package corrupted (e.g. signature or hash is invalid) pacman tries to remove the package file to redownload it anew the next time. Remove *.sig file as well to make sure no data is left for the invalid package. Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
d85d9c8c60
commit
ff7ff3c58d
1 changed files with 6 additions and 0 deletions
|
@ -688,7 +688,13 @@ static int prompt_to_delete(alpm_handle_t *handle, const char *filepath,
|
||||||
};
|
};
|
||||||
QUESTION(handle, &question);
|
QUESTION(handle, &question);
|
||||||
if(question.remove) {
|
if(question.remove) {
|
||||||
|
char *sig_filepath;
|
||||||
|
|
||||||
unlink(filepath);
|
unlink(filepath);
|
||||||
|
|
||||||
|
sig_filepath = _alpm_sigpath(handle, filepath);
|
||||||
|
unlink(sig_filepath);
|
||||||
|
FREE(sig_filepath);
|
||||||
}
|
}
|
||||||
return question.remove;
|
return question.remove;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue