From 5158b85b21b9316b610ab59ba65da36144e03b9a Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Mon, 7 Nov 2022 18:35:43 -0600 Subject: path: expand internal path selection API to allow for additional types Currently, nothing new is actually implemented but the idea is simply to just pass a type string all the way up from mp_find_user_file down to actually getting the platform path. This allows for selecting different directories besides the user's native config directory. See the next commit for an implementation. --- player/configfiles.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'player/configfiles.c') diff --git a/player/configfiles.c b/player/configfiles.c index 41c22ed2b9..9de7e36ec7 100644 --- a/player/configfiles.c +++ b/player/configfiles.c @@ -63,7 +63,7 @@ void mp_parse_cfgfiles(struct MPContext *mpctx) { struct MPOpts *opts = mpctx->opts; - mp_mk_config_dir(mpctx->global, ""); + mp_mk_user_dir(mpctx->global, "home", ""); char *p1 = mp_get_user_path(NULL, mpctx->global, "~~home/"); char *p2 = mp_get_user_path(NULL, mpctx->global, "~~old_home/"); @@ -226,7 +226,7 @@ static char *mp_get_playback_resume_config_filename(struct MPContext *mpctx, if (!mpctx->cached_watch_later_configdir) { mpctx->cached_watch_later_configdir = - mp_find_user_config_file(mpctx, mpctx->global, MP_WATCH_LATER_CONF); + mp_find_user_file(mpctx, mpctx->global, "home", MP_WATCH_LATER_CONF); } if (mpctx->cached_watch_later_configdir) @@ -292,7 +292,7 @@ void mp_write_watch_later_conf(struct MPContext *mpctx) if (!conffile) goto exit; - mp_mk_config_dir(mpctx->global, mpctx->cached_watch_later_configdir); + mp_mk_user_dir(mpctx->global, "home", mpctx->cached_watch_later_configdir); MP_INFO(mpctx, "Saving state.\n"); -- cgit v1.2.3