mirror of
https://github.com/ostreedev/ostree.git
synced 2024-10-26 17:25:36 +03:00
lib/repo-refs: properly return an error value
This tweaks a logic check in order to return a proper error value when the related condition is not satisfied.
This commit is contained in:
parent
61d22e5db6
commit
a118410b85
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user