From 0835e093e26b4d0e7c074dfb3260b07d6a7df5bb Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 3 Sep 2014 02:07:36 +0200 Subject: path: remove XDG bullshit Don't worry, your ~/.config/... paths are safe. This merely removes handling of $XDG_CONFIG_DIRS for global paths. Maybe there is a better solution for this, like still including the "traditional" config dir. But I will leave the fine reading of this (crappy) spec and fixing the code accordingly to someone else. So, if anyone has interest in getting this behavior back, you will have to write a patch. This patch should _also_ not break expected behavior. Fixes #1060. --- options/path.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'options/path.c') diff --git a/options/path.c b/options/path.c index 9d32a2ec9b..7e5495f844 100644 --- a/options/path.c +++ b/options/path.c @@ -73,29 +73,7 @@ static int mp_add_xdg_config_dirs(struct mpv_global *global, char **dirs, int i) i = mp_add_macosx_bundle_dir(global, dirs, i); #endif - tmp = getenv("XDG_CONFIG_DIRS"); - if (tmp && *tmp) { - char *xdgdirs = talloc_strdup(talloc_ctx, tmp); - while (xdgdirs) { - char *dir = xdgdirs; - - xdgdirs = strchr(xdgdirs, ':'); - if (xdgdirs) - *xdgdirs++ = 0; - - if (!dir[0]) - continue; - - dirs[i++] = talloc_asprintf(talloc_ctx, "%s%s", dir, "/mpv"); - - if (i + 1 >= MAX_CONFIG_PATHS) { - MP_WARN(global, "Too many config files, not reading any more\n"); - break; - } - } - } else { - dirs[i++] = MPLAYER_CONFDIR; - } + dirs[i++] = MPLAYER_CONFDIR; return i; } -- cgit v1.2.3