element-desktop: wrong cache path

Cache must not be stored in ~/.config/Riot/Cache. There is ~/.cache or $XDG_CACHE_HOME for cache. https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 4
  • Comments: 21 (5 by maintainers)

Most upvoted comments

Seems to have been solved in upstream, https://github.com/electron/electron/pull/33554 has been merged and closed.

This is the default location for all electron apps

Just because they don’t read standards does not mean it has to be reproduced.

$XDG_CONFIG_HOME is supposed to be a folder you can simply copy to new machines or sync to other machines.

This likely breaks badly if I try to sync with other machines.

Please read the XDG Base Dir Specification. If the variables are set the path must be derived from them. Not always is it ~/.cache.

Comment updated, is it better now? It doesn’t change anything anyway, since the main message was that it shouldn’t be in ~/.config.

what is the problem to workaround the path with app.setPath("cache", "~/.cache") ?

Indeed, on linux, Riot creates at least three cache directories under ~/.config/Riot: Cache, Code Cache, and GPUCache. These should be under ~/.cache/Riot instead. They’re wasting space in my backup archives, and circumventing the tmpfs I use for cache filesystems.