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

_srt_get_helpers_path: Adjust mapping from ${libdir} to ${prefix}


Only remove a /lib/CPU-linux-gnu suffix (not just /CPU-linux-gnu),
and handle a /lib64 suffix the same as /lib.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent c68cb08d
No related branches found
No related tags found
1 merge request!9Adjust code that libsteam-runtime-tools uses to find itself
......@@ -61,10 +61,11 @@ _srt_get_helpers_path (void)
g_debug ("Found _srt_get_helpers_path() in %s", map->l_name);
dir = g_path_get_dirname (map->l_name);
if (g_str_has_suffix (dir, "/" _SRT_MULTIARCH))
dir[strlen (dir) - strlen ("/" _SRT_MULTIARCH)] = '\0';
if (g_str_has_suffix (dir, "/lib"))
if (g_str_has_suffix (dir, "/lib/" _SRT_MULTIARCH))
dir[strlen (dir) - strlen ("/lib/" _SRT_MULTIARCH)] = '\0';
else if (g_str_has_suffix (dir, "/lib64"))
dir[strlen (dir) - strlen ("/lib64")] = '\0';
else if (g_str_has_suffix (dir, "/lib"))
dir[strlen (dir) - strlen ("/lib")] = '\0';
/* deliberate one-per-process leak */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment