mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
Check that XDG base directories paths are absolute
The [spec][1] reads: > All paths set in these environment variables must be absolute. If an > implementation encounters a relative path in any of these variables it should > consider the path invalid and ignore it. and > If $XDG_DATA_HOME is either not set or empty, a default equal to > $HOME/.local/share should be used. Testing that the path is absolute also entails that is is non-empty. [1]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
This commit is contained in:
parent
f710d01663
commit
9434e8d69f
8 changed files with 13 additions and 12 deletions
|
|
@ -515,7 +515,7 @@ xcursor_library_path(void)
|
|||
return strdup(env_var);
|
||||
|
||||
env_var = getenv("XDG_DATA_HOME");
|
||||
if (!env_var)
|
||||
if (!env_var || env_var[0] != '/')
|
||||
env_var = XDG_DATA_HOME_FALLBACK;
|
||||
|
||||
suffix = CURSORDIR ":" XCURSORPATH;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue