summaryrefslogtreecommitdiffstats
path: root/options/path.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-03 02:07:36 +0200
committerwm4 <wm4@nowhere>2014-09-03 02:07:36 +0200
commit0835e093e26b4d0e7c074dfb3260b07d6a7df5bb (patch)
treeeb88c55d1e44c63b8bf21450a83c17efcfb6fe13 /options/path.c
parent9e512c5a98fc5cf827611a809e43698197831b3d (diff)
downloadmpv-0835e093e26b4d0e7c074dfb3260b07d6a7df5bb.tar.bz2
mpv-0835e093e26b4d0e7c074dfb3260b07d6a7df5bb.tar.xz
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.
Diffstat (limited to 'options/path.c')
-rw-r--r--options/path.c24
1 files changed, 1 insertions, 23 deletions
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;
}