[glib] portal support: Read /.flatpak-info
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] portal support: Read /.flatpak-info
- Date: Mon, 1 May 2017 18:16:01 +0000 (UTC)
commit 82e31de04dcf4670f869dd2606244ffcadd7c9ac
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Apr 27 07:22:18 2017 -0400
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
gio/gportalsupport.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/gio/gportalsupport.c b/gio/gportalsupport.c
index 74cb270..d6d6f41 100644
--- a/gio/gportalsupport.c
+++ b/gio/gportalsupport.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]