package_remove: reset errno when a file does not exist (ENOENT).

To not propagate it later on... and also pass rv not errno to the
state callback function.
This commit is contained in:
Juan RP 2015-12-01 08:31:05 +01:00
parent a9482027b2
commit 2830bbef6d

View File

@ -81,10 +81,11 @@ check_remove_pkg_files(struct xbps_handle *xhp,
}
fail = true;
xbps_set_cb_state(xhp, XBPS_STATE_REMOVE_FILE_FAIL,
errno, pkgver,
rv, pkgver,
"%s: cannot remove `%s': %s",
pkgver, file, strerror(rv));
}
errno = 0;
}
xbps_object_iterator_release(iter);
}