summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-03 02:07:36 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2014-09-03 23:22:08 +0200
commit46437e96c6f76f037341b6daf7f2267be6913eb5 (patch)
tree911937f7abdbd754265a40b6f4d8e6c35f47f875
parent29d3bbdaa252078bf83ef8d9e09ffc2034434e7f (diff)
downloadmpv-46437e96c6f76f037341b6daf7f2267be6913eb5.tar.bz2
mpv-46437e96c6f76f037341b6daf7f2267be6913eb5.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.
-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;
}