summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <wjt@endlessos.org>2021-11-11 15:48:04 +0000
committerSimon McVittie <smcv@debian.org>2021-11-11 16:38:11 +0000
commit7534a970a5535d57d5fa07bd5ed9eb3647cbb7dc (patch)
tree8c7f77d02057b991e802113a4edce4a4eeb65a6d
parent692ec8644e23999133bb281dd74c8c1b2dffaff2 (diff)
downloadflatpak-7534a970a5535d57d5fa07bd5ed9eb3647cbb7dc.tar.gz
run: Support PulseAudio socket path without unix: prefix
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/ServerStrings/ says: > If the string starts with / or unix: the remaining address string is taken as > UNIX socket name. but previously the string was only taken to be a UNIX socket name if it began with "unix:". This is an issue in practice with WSLg <https://github.com/microsoft/wslg> which sets $PULSE_SERVER to "/mnt/wslg/PulseServer", without a "unix:" prefix.
-rw-r--r--common/flatpak-run.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/flatpak-run.c b/common/flatpak-run.c
index fc66672f..7059303e 100644
--- a/common/flatpak-run.c
+++ b/common/flatpak-run.c
@@ -591,8 +591,11 @@ flatpak_run_parse_pulse_server (const char *value)
continue;
server = closing + 1;
}
+
if (g_str_has_prefix (server, "unix:"))
return g_strdup (server + 5);
+ if (server[0] == '/')
+ return g_strdup (server);
}
return NULL;