mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-10 11:12:46 -04:00
decomposed: Support defaults in flatpak_decomposed_new_from_parts
This allows NULL for arch and branch, similar to e.g. flatpak_build_runtime_ref().
This commit is contained in:
committed by
Alexander Larsson
parent
3b63c51ce6
commit
abb097f812
@@ -907,6 +907,15 @@ flatpak_decomposed_new_from_parts (FlatpakKinds kind,
|
||||
const char *branch,
|
||||
GError **error)
|
||||
{
|
||||
g_assert (kind == FLATPAK_KINDS_APP || kind == FLATPAK_KINDS_RUNTIME);
|
||||
g_assert (id != NULL);
|
||||
|
||||
if (branch == NULL)
|
||||
branch = "master";
|
||||
|
||||
if (arch == NULL)
|
||||
arch = flatpak_get_arch ();
|
||||
|
||||
return flatpak_decomposed_new_from_decomposed (NULL, kind, id, arch, branch, error);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user