bin/xbps-rindex/sign.c: use access(2) to check if pkg signature exists.

This commit is contained in:
Juan RP 2013-12-26 07:59:11 +01:00
parent 35e4182250
commit 0a9522210a

View File

@ -183,7 +183,7 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
/*
* Skip pkg if file signature exists
*/
if ((binpkg_sig_fd = open(binpkg_sig, O_RDONLY)) == 0) {
if ((binpkg_sig_fd = access(binpkg_sig, R_OK)) == 0) {
fprintf(stdout, "skipping %s, file signature found.\n", pkgver);
free(binpkg);
free(binpkg_sig);