libxbps: xbps_repository_sync_pkg_index: set correct error in err cb.

This commit is contained in:
Juan RP 2011-11-11 00:31:09 +01:00
parent 756234e9c3
commit bcaaf60966

View File

@ -179,7 +179,10 @@ xbps_repository_sync_pkg_index(const char *uri)
if (xhp->xbps_transaction_err_cb) {
xhp->xtcd->state = XBPS_TRANS_STATE_REPOSYNC;
xhp->xtcd->repourl = uri;
if (fetchLastErrCode != 0)
xhp->xtcd->err = fetchLastErrCode;
else
xhp->xtcd->err = errno;
xhp->xbps_transaction_err_cb(xhp->xtcd);
}
rv = -1;