Merge pull request #2746 from lucab/ups/lib-repo-refs-error

lib/repo-refs: properly return an error value
This commit is contained in:
Colin Walters 2022-10-26 09:14:48 -04:00 committed by GitHub
commit aded044149
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,8 @@ add_ref_to_set (const char *remote,
GCancellable *cancellable,
GError **error)
{
g_return_val_if_fail (remote == NULL || collection_id == NULL, FALSE);
if (remote != NULL && collection_id != NULL)
return glnx_throw (error, "Cannot process both a remote and a collection ID");
gsize len;
char *contents = glnx_file_get_contents_utf8_at (base_fd, path, &len, cancellable, error);