#include "gportalsupport.h"
-static gboolean flatpak_info_read;
static gboolean use_portal;
static gboolean network_available;
static gboolean dconf_access;
static void
read_flatpak_info (void)
{
+ static gsize flatpak_info_read = 0;
const gchar *path = "/.flatpak-info";
- if (flatpak_info_read)
+ if (!g_once_init_enter (&flatpak_info_read))
return;
- flatpak_info_read = TRUE;
-
if (g_file_test (path, G_FILE_TEST_EXISTS))
{
GKeyFile *keyfile;
network_available = TRUE;
dconf_access = TRUE;
}
+
+ g_once_init_leave (&flatpak_info_read, 1);
}
gboolean