From dfb63d55dddabb6cc211880fca3974d9c2c297ba Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Oct 2021 11:29:35 +1000 Subject: [PATCH] media-session: use the SESSION_PREFIX for any fallback config dir Regression introduced in 3560f3ba2d41a8596c40ee3894fe2484039aac47 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 --- src/media-session/media-session.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/media-session/media-session.c b/src/media-session/media-session.c index fe773a836..a0e9c773b 100644 --- a/src/media-session/media-session.c +++ b/src/media-session/media-session.c @@ -2369,9 +2369,10 @@ static int collect_modules(struct impl *impl, const char *str) int count = 0; dir = getenv("MEDIA_SESSION_CONFIG_DIR"); - if (dir == NULL && (dir = getenv("PIPEWIRE_CONFIG_DIR")) == NULL) { - dir = PIPEWIRE_CONFDATADIR; + if (dir == NULL) { prefix = SESSION_PREFIX; + if ((dir = getenv("PIPEWIRE_CONFIG_DIR")) == NULL) + dir = PIPEWIRE_CONFDATADIR; } if (dir == NULL) return -ENOENT;