mirror of
https://github.com/mpv-player/mpv
synced 2025-01-24 00:23:27 +00:00
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.
This commit is contained in:
parent
9e512c5a98
commit
0835e093e2
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user