player: create config dir if it doesn't exist

This was dropped in the commit adding XDG support, probably
accidentally.

Also normalize some whitespace.
This commit is contained in:
wm4 2014-06-26 18:12:28 +02:00
parent 236fcd3648
commit 0dcde951b9
2 changed files with 3 additions and 4 deletions

View File

@ -45,8 +45,6 @@
#define STRNULL(s) ((s) ? (s) : "(NULL)")
static void mp_add_xdg_config_dirs(void *talloc_ctx, struct mpv_global *global,
char **dirs, int i)
{
@ -133,8 +131,6 @@ static char **mp_config_dirs(void *talloc_ctx, struct mpv_global *global)
return ret;
}
char *mp_find_config_file(void *talloc_ctx, struct mpv_global *global,
const char *filename)
{
@ -159,6 +155,7 @@ char *mp_find_config_file(void *talloc_ctx, struct mpv_global *global,
STRNULL(res));
return res;
}
char **mp_find_all_config_files(void *talloc_ctx, struct mpv_global *global,
const char *filename)
{

View File

@ -64,6 +64,8 @@ void mp_parse_cfgfiles(struct MPContext *mpctx)
if (!opts->load_config)
return;
mp_mk_config_dir(mpctx->global, "");
m_config_t *conf = mpctx->mconfig;
void *tmp = talloc_new(NULL);
char *conffile;