mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-22 22:35:59 +01:00
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:
parent
ab8ff54f4c
commit
b92ad3eb6b
1 changed files with 3 additions and 4 deletions
|
@ -91,17 +91,16 @@ static char *get_config_path(void) {
|
||||||
char *config_home_fallback = calloc(size_fallback, sizeof(char));
|
char *config_home_fallback = calloc(size_fallback, sizeof(char));
|
||||||
snprintf(config_home_fallback, size_fallback, "%s/.config", home);
|
snprintf(config_home_fallback, size_fallback, "%s/.config", home);
|
||||||
|
|
||||||
char *prefix[4];
|
char *prefix[3];
|
||||||
prefix[0] = getenv("XDG_CONFIG_HOME");
|
prefix[0] = getenv("XDG_CONFIG_HOME");
|
||||||
prefix[1] = config_home_fallback;
|
prefix[1] = config_home_fallback;
|
||||||
prefix[2] = SYSCONFDIR "/xdg";
|
prefix[2] = SYSCONFDIR "/xdg";
|
||||||
prefix[3] = SYSCONFDIR;
|
|
||||||
|
|
||||||
char *config[2];
|
char *config[2];
|
||||||
config[0] = getenv("XDG_CURRENT_DESKTOP");
|
config[0] = getenv("XDG_CURRENT_DESKTOP");
|
||||||
config[1] = "config";
|
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++) {
|
for (size_t j = 0; j < 2; j++) {
|
||||||
char *path = config_path(prefix[i], config[j]);
|
char *path = config_path(prefix[i], config[j]);
|
||||||
if (!path) {
|
if (!path) {
|
||||||
|
|
Loading…
Reference in a new issue