WebCord icon indicating copy to clipboard operation
WebCord copied to clipboard

Cache and other not config data gets saved in XDG_CONFIG_HOME

Open Toorero opened this issue 2 years ago • 1 comments

Problem description

If I list my WebCord folder saved in XDG_CONFIG_HOME it shows a bunch of stuff that should clearly not be there according to the freedesktop (XDG) specification

This is quite messy and not very maintainable. Improper storage will cause problems or require special handling to function properly:

  1. Exclude cache from your backups
  2. Removing all cache if you're running low on space
  3. Only sync config data to cloud services like Nextcloud to sync your config across devices.

Fix

Move the directories Cache,Code Cache, GPUCache, DawnCache and the CacheStorage of the service workers into XDG_CACHE_HOME/WebCord. There may be more "non-essential (cached) data" to be stored there but I'm not familiar what stores what. Also, other data like the windowState and Cookies could be moved into the XDG_STATE_HOME.

Toorero avatar May 09 '23 12:05 Toorero

@Toorero most of these files/directories are actually created by Chromium in these paths and I might not be able to replace them. Moreover, it might not be the best idea to overwrite the default behaviour from Chromium/Electron, as it would make its storage paths non-standard for WebCord when comparing to another Electron software – and there are some apps already detecting and utilizing Chromium paths on Linux like BleachBit to provide its functionality, so if WebCord would be an exception, it could break more stuff than actually fix.

I would recommend reporting in on Electron, which would not only fix it for WebCord, but also make any other Electron-based application work in the same way. As of myself, I will treat this issue ticket as lower-priority ones and possibly work on it during/after rewrite of the WebCord.

SpacingBat3 avatar May 12 '23 13:05 SpacingBat3