examples: media-session: Conform to XDG base directory spec
Currently pipewire-media-session uses ~/.pipewire-media-session for
storing configuration. Use home directory as specified by XDG base
directory specification viz. XDG_CONFIG_HOME and fall back to using
a default of $HOME/.config as per the spec if XDG_CONFIG_HOME is not
set or empty. Also in addition, all cases are now handled the same
and always end up using "%s/.config/pipewire-media-session".
If neither XDG_CONFIG_HOME or HOME are set, fall back to the earlier
approach.
Fixes: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/271
Signed-off-by: Sanchayan Maity sanchayan@asymptotic.io
Edited by Sanchayan Maity