quest-sidenoder
quest-sidenoder copied to clipboard
Set `sidenoderHome` to `userData`, instead of user's home
Hello,
Currently sidenoder stores it's data in the user's home, this make it cluttered and may clash with other applications.
A cleaner approach would be to use Electron's app.getPath('userData') that uses each supported OSes specific per-application data directory
Relevant code: https://github.com/vKolerts/quest-sidenoder/blob/2d84b1339ada40b48117ed55d58fa75714ac0860/main.js#L22
To not break sidenoder for current users, it could first check if the sidenoder directory exists in user's home, and use that if it is the case. Something along the lines of:
global.sidenoderHome = path.join(global.homedir, 'sidenoder').replace(/\\/g, '/');
if (!fs.existsSync(global.sidenoderHome))
global.sidenoderHome = app.getPath('userData')
To Reproduce Steps to reproduce the behavior:
- Open sidenoder
- sidenoder data directory is created at user home
Expected behavior Sidenoder creates it's data directory in each supported OSes specific per-application data directory
Desktop:
- OS: Tested on Windows and Linux (ArchLinux)
- Binary: .exe and .appimage
- Version: 0.7.3
Thanks, I will think about this. Maybe will make it optional for customize path of home dir