media-session: use the SESSION_PREFIX for any fallback config dir

Regression introduced in 3560f3ba2d

MEDIA_SESSION_CONFIG_PATH expects the actual directory while
PIPEWIRE_CONFIG_PATH and the built-in fallback both expect the files to
reside within the SESSION_PREFIX subdirectory.

Fixes #1725
This commit is contained in:
Peter Hutterer 2021-10-18 11:29:35 +10:00 committed by Wim Taymans
parent 56f01a293c
commit dfb63d55dd

View file

@ -2369,9 +2369,10 @@ static int collect_modules(struct impl *impl, const char *str)
int count = 0; int count = 0;
dir = getenv("MEDIA_SESSION_CONFIG_DIR"); dir = getenv("MEDIA_SESSION_CONFIG_DIR");
if (dir == NULL && (dir = getenv("PIPEWIRE_CONFIG_DIR")) == NULL) { if (dir == NULL) {
dir = PIPEWIRE_CONFDATADIR;
prefix = SESSION_PREFIX; prefix = SESSION_PREFIX;
if ((dir = getenv("PIPEWIRE_CONFIG_DIR")) == NULL)
dir = PIPEWIRE_CONFDATADIR;
} }
if (dir == NULL) if (dir == NULL)
return -ENOENT; return -ENOENT;