deltachat / deltachat-desktop

Email-based instant messaging for Desktop.
GNU General Public License v3.0
952 stars 170 forks source link

deltachat-desktop on Linux misuses XDG configuration location for storing cached data, not just configuration #3986

Open dkg opened 5 months ago

dkg commented 5 months ago

I am testing DeltaChat 1.46.1 on Debian stable (12.5).

It looks to me like DeltaChat is storing configuration information, application state, application data, and ephemeral (cached) material all within ~/.config/DeltaChat.

The XDG basedir spec identifies ~/.config (as $XDG_CONFIG_HOME) specifically for "user-specific configuration". However, i see at least two things stored here that are definitely not local configuration:

Using the XDG basedirs will make the application integrate more smoothly with arbitrary machine setups.

farooqkz commented 5 months ago

Thanks even I didn't know that. Yeah it makes perfect sense that cache data should live in their own home not someone else's.

@Simon-Laux Who is in charge of Cache? I mean what part of Desktop?

Simon-Laux commented 5 months ago

electron / main process code is, not sure yet how to change that, might be electron api that we call on startup (like a chrome cli switch, or standard electron api), might be an env var, or electron-builder config. or if we are unlucky it's an upstream issue in electron.

nicodh commented 4 months ago

There is an old issue still unsolved but still active discussed: https://github.com/electron/electron/issues/8124 and a project related to that problem: https://github.com/danisztls/ephemeral