diff options
| author | Ian Johnson <ian@ianjohnson.dev> | 2024-08-19 23:11:32 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-08-19 23:30:14 -0700 |
| commit | 0a70455095a19a4c18497e6786ca6139c1cc2892 (patch) | |
| tree | e3b5ca0499e459ac413a2e4152dcae5ad6a9b833 /src/codegen/c.zig | |
| parent | dffc8c44f9a01aa05ea364ffdc71509d15bc2601 (diff) | |
| download | zig-0a70455095a19a4c18497e6786ca6139c1cc2892.tar.gz zig-0a70455095a19a4c18497e6786ca6139c1cc2892.zip | |
Fix handling of empty XDG environment variables
Closes #21132
According to the XDG Base Directory specification
(https://specifications.freedesktop.org/basedir-spec/latest/#variables),
empty values for these environment variables should be treated the same
as if they are unset. Specifically, for the instances changed in this
commit,
> $XDG_DATA_HOME defines the base directory relative to which
> user-specific data files should be stored. If $XDG_DATA_HOME is either
> not set **or empty**, a default equal to $HOME/.local/share should be
> used.
and
> $XDG_CACHE_HOME defines the base directory relative to which
> user-specific non-essential data files should be stored. If
> $XDG_CACHE_HOME is either not set **or empty**, a default equal to
> $HOME/.cache should be used.
(emphasis mine)
In addition to the case mentioned in the linked issue, all other uses of
XDG environment variables were corrected.
Diffstat (limited to 'src/codegen/c.zig')
0 files changed, 0 insertions, 0 deletions
