swindlesmccoop / aureate

An AUR helper written in C
https://youtu.be/lamPvoJxTsM
17 stars 4 forks source link

XDG_CACHE_HOME isn't always set (Segmentation fault) #1

Closed c4llv07e closed 1 year ago

c4llv07e commented 1 year ago

On some machines (including mine), XDG_CACHE_HOME is not set, and because of this, the program crashes. It is better to set a fallback cache directory (by default ~/.cache) for this.

rfc-2549 commented 1 year ago

Does that thing work? syscache is still const char *

c4llv07e commented 1 year ago

Yes, but now if getenv returns NULL syscache fallbacks to ~/.cache. It works on my machine and, as I think, shouldn't break anything.