diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-12-30 09:23:36 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-01-25 17:00:09 +0900 |
commit | 8e1e814166e3a43c7873bda83120cea631984979 (patch) | |
tree | 78868b0797f4a310677fa0b3889a396733859d52 /player | |
parent | da2167088018e01c5e15cb1eda6ea370236e6a96 (diff) | |
download | mpv-8e1e814166e3a43c7873bda83120cea631984979.tar.bz2 mpv-8e1e814166e3a43c7873bda83120cea631984979.tar.xz |
options: expand ~ for the include option
Fixes #1406
Diffstat (limited to 'player')
-rw-r--r-- | player/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/player/main.c b/player/main.c index d3be73c3db..690cda744f 100644 --- a/player/main.c +++ b/player/main.c @@ -46,6 +46,7 @@ #include "options/parse_commandline.h" #include "common/playlist.h" #include "options/options.h" +#include "options/path.h" #include "input/input.h" #include "audio/decode/dec_audio.h" @@ -306,7 +307,10 @@ static void osdep_preinit(int *p_argc, char ***p_argv) static int cfg_include(void *ctx, char *filename, int flags) { struct MPContext *mpctx = ctx; - return m_config_parse_config_file(mpctx->mconfig, filename, NULL, flags); + char *fname = mp_get_user_path(NULL, mpctx->global, filename); + int r = m_config_parse_config_file(mpctx->mconfig, fname, NULL, flags); + talloc_free(fname); + return r; } struct MPContext *mp_create(void) |