[sysprof/wip/chergert/sysprof-3] libsysprof: try local proc file access if not in flatpak
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/chergert/sysprof-3] libsysprof: try local proc file access if not in flatpak
- Date: Mon, 20 May 2019 20:56:17 +0000 (UTC)
commit 3a76098ef9a86c62d77f702da52566a6aec9a5b3
Author: Christian Hergert <chergert redhat com>
Date: Mon May 20 13:33:14 2019 -0700
libsysprof: try local proc file access if not in flatpak
src/libsysprof/sysprof-helpers.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/libsysprof/sysprof-helpers.c b/src/libsysprof/sysprof-helpers.c
index b8e60db..3f5b0e7 100644
--- a/src/libsysprof/sysprof-helpers.c
+++ b/src/libsysprof/sysprof-helpers.c
@@ -343,6 +343,13 @@ sysprof_helpers_get_proc_file (SysprofHelpers *self,
g_return_val_if_fail (SYSPROF_IS_HELPERS (self), FALSE);
g_return_val_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable), FALSE);
+ /* try locally first if we can */
+ if (!g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS))
+ {
+ if (helpers_get_proc_file (path, contents, &len))
+ return TRUE;
+ }
+
if (self->proxy != NULL)
{
if (ipc_service_call_get_proc_file_sync (self->proxy, path, contents, cancellable, error))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]