Use a simpler sandbox check

No need to use the runtime dir and allocate a string.
We can just check in /.
This commit is contained in:
Matthias Clasen 2018-11-01 13:31:10 -04:00
parent 833442e1e2
commit 1c465604d5

View File

@ -269,14 +269,7 @@ gdk_get_startup_notification_id (void)
gboolean
gdk_running_in_sandbox (void)
{
char *path;
gboolean ret;
path = g_build_filename (g_get_user_runtime_dir (), "flatpak-info", NULL);
ret = g_file_test (path, G_FILE_TEST_EXISTS);
g_free (path);
return ret;
return g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
}
/**