Skip to content

Commit

Permalink
command: expand ~ paths in load-config-file
Browse files Browse the repository at this point in the history
  • Loading branch information
guidocella authored and kasper93 committed Aug 30, 2024
1 parent c890635 commit 7c672e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion player/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -6531,9 +6531,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;
Expand Down

0 comments on commit 7c672e3

Please sign in to comment.