Skip to content
Snippets Groups Projects
Commit c6e355c9 authored by Simon McVittie's avatar Simon McVittie
Browse files

_srt_get_helpers_path: If in /lib, assume helpers are in /usr/libexec


On a system with merged-/usr, steam-runtime-tools might be installed
in /usr/lib/MULTIARCH (or /usr/lib64 or /lib64) but found via the
/lib -> usr/lib or /lib64 -> usr/lib64 symlink. /libexec doesn't
normally exist, so look for the helpers in /usr/libexec instead.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 049bb6ec
No related branches found
No related tags found
1 merge request!14_srt_get_helpers_path: If in /lib, assume helpers are in /usr/libexec
......@@ -68,6 +68,15 @@ _srt_get_helpers_path (void)
else if (g_str_has_suffix (dir, "/lib"))
dir[strlen (dir) - strlen ("/lib")] = '\0';
/* If the library was found in /lib/MULTIARCH, /lib64 or /lib on a
* merged-/usr system, assume --prefix=/usr (/libexec doesn't
* normally exist) */
if (dir[0] == '\0')
{
g_free (dir);
dir = g_strdup ("/usr");
}
/* deliberate one-per-process leak */
helpers_path = g_build_filename (
dir, "libexec", "steam-runtime-tools-" _SRT_API_MAJOR,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment