helpers: allow /sys/ access too

This commit is contained in:
Christian Hergert
2019-05-10 21:11:31 -07:00
parent 70ace7f160
commit 297f1b70f5

View File

@ -277,7 +277,7 @@ helpers_get_proc_file (const gchar *path,
canon = g_file_get_path (file);
return g_file_is_native (file) &&
g_str_has_prefix (canon, "/proc/") &&
(g_str_has_prefix (canon, "/proc/") || g_str_has_prefix (canon, "/sys/")) &&
g_file_get_contents (canon, contents, len, NULL);
}