Skip to content
Myr

config: ignore ${XDG_CONFIG_HOME} if it's a relative path

Before adoption: this commit came in with the history the project adopted, so no landing records it.

The specification establishes that the variable must be set to an absolute path and implementations should ignore relative paths.

authored by Leonardo Hernández Hernández · committed by Leonardo Hernández Hernández · parent d7a9ed5 · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • References: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:config.c+2 added-1 removed
182 unmodified lines
183 const char *home_dir = getenv("HOME");184 char *xdg_config_dirs_copy = NULL;185186 /* First, check XDG_CONFIG_HOME (or .config, if unset) */187 if (xdg_config_home != NULL && xdg_config_home[0] != '\0') {187 if (xdg_config_home != NULL && xdg_config_home[0] != '\0' &&188 xdg_config_home[0] != '/') {189 if (asprintf(&path, "%s/fuzzel/fuzzel.ini", xdg_config_home) < 0) {190 LOG_ERRNO("failed to build fuzzel.ini path");191 goto done;192 }
1462 unmodified lines