Commit 59531e2b authored by Christian Hergert's avatar Christian Hergert

flatpak: check for enumerator failure

parent c18a0d44
......@@ -49,6 +49,9 @@ gbp_flatpak_build_system_discovery_find_manifests (GFile *directory,
g_assert (results != NULL);
g_assert (depth < DISCOVERY_MAX_DEPTH);
if (g_cancellable_is_cancelled (cancellable))
return;
enumerator = g_file_enumerate_children (directory,
G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK","
G_FILE_ATTRIBUTE_STANDARD_NAME","
......@@ -57,6 +60,9 @@ gbp_flatpak_build_system_discovery_find_manifests (GFile *directory,
cancellable,
NULL);
if (enumerator == NULL)
return;
while (NULL != (infoptr = g_file_enumerator_next_file (enumerator, cancellable, NULL)))
{
g_autoptr(GFileInfo) info = infoptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment