mirror of https://github.com/mpv-player/mpv
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:
parent
236fcd3648
commit
0dcde951b9
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue