lib/repo.c: CID 62671 (unchecked return value)

This commit is contained in:
Juan RP 2014-10-05 12:22:18 +02:00
parent 616af5c207
commit 66292180a3

View File

@ -509,10 +509,10 @@ xbps_repo_key_import(struct xbps_repo *repo)
dbkeyd = dirname(p);
assert(dbkeyd);
if (access(dbkeyd, R_OK|W_OK) == -1) {
if (errno == ENOENT) {
xbps_mkpath(dbkeyd, 0755);
} else {
rv = errno;
rv = errno;
if (rv == ENOENT)
rv = xbps_mkpath(dbkeyd, 0755);
if (rv != 0) {
xbps_dbg_printf(repo->xhp,
"[repo] `%s' cannot create %s: %s\n",
repo->uri, dbkeyd, strerror(errno));