buildbarn / bb-clientd

Buildbarn client-side FUSE/NFSv4 daemon
Apache License 2.0
39 stars 11 forks source link

bb_clientd does not respect XDG_CACHE_HOME #16

Closed staehle closed 4 months ago

staehle commented 4 months ago

Hi, per the XDG Base Directory Specification, https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html , ${XDG_CACHE_HOME} is the environment variable used to denote the user's "cache" directory. bb_clientd does not respect this, and assumes ~/.cache. You can default to that if the variable turns up empty, but it shouldn't be assumed.

local homeDirectory = std.extVar('HOME');
- local cacheDirectory = homeDirectory + '/.cache/bb_clientd';
+ local cacheDirectory = std.extVar('XDG_CACHE_HOME') + '/bb_clientd';

Thank you