aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
diff options
context:
space:
mode:
authorGravatar Stefano Pigozzi <stefano.pigozzi@gmail.com>2014-12-30 09:23:36 +0100
committerGravatar Stefano Pigozzi <stefano.pigozzi@gmail.com>2014-12-30 09:23:36 +0100
commit0fa9986a9803801fdf5e5f2286311542fd72edcf (patch)
tree6ef684d6641d0491bd510cfc796cff7931ec5154 /player
parent196d4fce5b326013110aea849d3841b2718d604b (diff)
options: expand ~ for the include option
Fixes #1406
Diffstat (limited to 'player')
-rw-r--r--player/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/player/main.c b/player/main.c
index 41a57981e4..7f334d1128 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"
@@ -316,7 +317,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)