mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
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:
@@ -45,8 +45,6 @@
|
|||||||
|
|
||||||
#define STRNULL(s) ((s) ? (s) : "(NULL)")
|
#define STRNULL(s) ((s) ? (s) : "(NULL)")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void mp_add_xdg_config_dirs(void *talloc_ctx, struct mpv_global *global,
|
static void mp_add_xdg_config_dirs(void *talloc_ctx, struct mpv_global *global,
|
||||||
char **dirs, int i)
|
char **dirs, int i)
|
||||||
{
|
{
|
||||||
@@ -133,8 +131,6 @@ static char **mp_config_dirs(void *talloc_ctx, struct mpv_global *global)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
char *mp_find_config_file(void *talloc_ctx, struct mpv_global *global,
|
char *mp_find_config_file(void *talloc_ctx, struct mpv_global *global,
|
||||||
const char *filename)
|
const char *filename)
|
||||||
{
|
{
|
||||||
@@ -159,6 +155,7 @@ char *mp_find_config_file(void *talloc_ctx, struct mpv_global *global,
|
|||||||
STRNULL(res));
|
STRNULL(res));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
char **mp_find_all_config_files(void *talloc_ctx, struct mpv_global *global,
|
char **mp_find_all_config_files(void *talloc_ctx, struct mpv_global *global,
|
||||||
const char *filename)
|
const char *filename)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ void mp_parse_cfgfiles(struct MPContext *mpctx)
|
|||||||
if (!opts->load_config)
|
if (!opts->load_config)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
mp_mk_config_dir(mpctx->global, "");
|
||||||
|
|
||||||
m_config_t *conf = mpctx->mconfig;
|
m_config_t *conf = mpctx->mconfig;
|
||||||
void *tmp = talloc_new(NULL);
|
void *tmp = talloc_new(NULL);
|
||||||
char *conffile;
|
char *conffile;
|
||||||
|
|||||||
Reference in New Issue
Block a user