From bc430fdbb833b8a3e1a8c5ccbd84844740326d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sat, 8 Feb 2025 05:23:15 +0100 Subject: [PATCH] player/command: don't synthesize property names with a trailing / This is not only cosmetic, but also avoids dummy get key action with empty key. While this was allowed previously, I'm bit concerned about Hyrum's law. But let's be strict about it. This commit fixes current-tracks property. Fixes: 95019fc256d8df21994b20d2503b203ac09083cc --- player/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/command.c b/player/command.c index 22d50ad5cd..ff35a9d1c7 100644 --- a/player/command.c +++ b/player/command.c @@ -2290,7 +2290,7 @@ static int mp_property_current_tracks(void *ctx, struct m_property *prop, } assert(index >= 0); - char *name = mp_tprintf(80, "track-list/%d/%s", index, rem); + char *name = mp_tprintf(80, "track-list/%d%s%s", index, *rem ? "/" : "", rem); return mp_property_do(name, ka->action, ka->arg, ctx); }