Drop /etc/xdg-desktop-portal-wlr/ from config file dirs

We were checking both /etc/xdg-desktop-portal-wlr/ and
/etc/xdg/xdg-desktop-portal-wlr/. These two directories serve the same
purpose, let's just settle on a single one.
This commit is contained in:
Simon Ser 2021-03-15 10:09:44 +01:00
parent ab8ff54f4c
commit b92ad3eb6b

View file

@ -91,17 +91,16 @@ static char *get_config_path(void) {
char *config_home_fallback = calloc(size_fallback, sizeof(char));
snprintf(config_home_fallback, size_fallback, "%s/.config", home);
char *prefix[4];
char *prefix[3];
prefix[0] = getenv("XDG_CONFIG_HOME");
prefix[1] = config_home_fallback;
prefix[2] = SYSCONFDIR "/xdg";
prefix[3] = SYSCONFDIR;
char *config[2];
config[0] = getenv("XDG_CURRENT_DESKTOP");
config[1] = "config";
for (size_t i = 0; i < 4; i++) {
for (size_t i = 0; i < 3; i++) {
for (size_t j = 0; j < 2; j++) {
char *path = config_path(prefix[i], config[j]);
if (!path) {