alsa-mixer: Respect XDG base directory spec when loading path configs

Try $XDG_DATA_HOME, then $XDG_DATA_DIRS, and finally fall back to old
behaviour (prefix-defined directory).

core-util: Ignore non-absolute XDG base dirs

These are invalid per the spec.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/862
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/293>
This commit is contained in:
SimonP 2020-05-07 16:13:27 +01:00 committed by PulseAudio Marge Bot
parent cb91d7a12e
commit 9b0ae8327d
4 changed files with 127 additions and 9 deletions

View file

@ -17,7 +17,6 @@
* Meson. */
#ifndef MESON_BUILD
/* This function was copied from alsa-mixer.c */
static const char *get_default_paths_dir(void) {
if (pa_run_from_build_tree())
return PA_SRCDIR "/modules/alsa/mixer/paths/";