mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
portal support: Read /.flatpak-info
The flatpak-info file was moved to a different location a while ago, we should read it from there instead of relying on the compat symlink. One advantage is that this is a fixed, short path, we don't have to construct one dynamically. https://bugzilla.gnome.org/show_bug.cgi?id=781826
This commit is contained in:
parent
84134c64ed
commit
82e31de04d
@ -27,15 +27,12 @@ static gboolean network_available;
|
||||
static void
|
||||
read_flatpak_info (void)
|
||||
{
|
||||
char *path;
|
||||
|
||||
if (flatpak_info_read)
|
||||
return;
|
||||
|
||||
flatpak_info_read = TRUE;
|
||||
|
||||
path = g_build_filename (g_get_user_runtime_dir (), "flatpak-info", NULL);
|
||||
if (g_file_test (path, G_FILE_TEST_EXISTS))
|
||||
if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS))
|
||||
{
|
||||
GKeyFile *keyfile;
|
||||
|
||||
@ -66,8 +63,6 @@ read_flatpak_info (void)
|
||||
use_portal = TRUE;
|
||||
network_available = TRUE;
|
||||
}
|
||||
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user