From 8318bba37c5c0faaedf3e2e6a3678c2233b1bde2 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Fri, 30 Aug 2024 18:37:30 +0200 Subject: [PATCH] command: expand ~ paths in load-config-file Fixes #14766. --- player/command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/player/command.c b/player/command.c index 04dd0c9f6e843..66aac6df26d43 100644 --- a/player/command.c +++ b/player/command.c @@ -6526,9 +6526,11 @@ static void cmd_load_config_file(void *p) struct mp_cmd_ctx *cmd = p; struct MPContext *mpctx = cmd->mpctx; - char *config_file = cmd->args[0].v.s; + void *ctx = talloc_new(NULL); + char *config_file = mp_get_user_path(ctx, mpctx->global, cmd->args[0].v.s); int r = m_config_parse_config_file(mpctx->mconfig, mpctx->global, config_file, NULL, 0); + talloc_free(ctx); if (r < 1) { cmd->success = false;