util: manually extract the program name from program_invocation_name
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 14 Jun 2018 01:00:21 +0000 (11:00 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 19 Jun 2018 02:09:56 +0000 (12:09 +1000)
commitde93f546a7f9f3407f88ea8dd2d4b3f7158e94ed
treee61a5fc96fb63b43bd6596b2facea01ea28f28ed
parent1a8501a9ddfff6c3eab47046e0e8a9dc17492bf0
util: manually extract the program name from program_invocation_name

Glibc has the same code to get program_invocation_short_name. However
for some reason the short name gets mangled for some wine apps.

For example with Google Earth VR I get:

program_invocation_name:
"/home/tarceri/.local/share/Steam/steamapps/common/EarthVR/Earth.exe"

program_invocation_short_name:
"e"

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
src/util/xmlconfig.c