Open ZerdoX-x opened 3 years ago
If envs will be implemented as workaround, do not forget to document them on wiki.
Mac OS X also has it's own specs about files location for example -- https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFileSystem/Articles/WhereToPutFiles.html
~/.tableplus/
if there is one.chmod -222 $HOME
.Logs:
``` [~] tableplus tableplus: /usr/lib/libldap_r-2.4.so.2: no version information available (required by tableplus) Error: Error creating directory /home/zerdox/.tableplus: Permission denied Error: Error creating directory /home/zerdox/.tableplus: Permission denied Error: Error opening file “/home/zerdox/.tableplus/settings/settings.json”: No such file or directory Error: Error opening file “/home/zerdox/.tableplus/settings/connections.json”: No such file or directory Error: Error opening file “/home/zerdox/.tableplus/settings/settings.json”: No such file or directory Error: Error opening file “/home/zerdox/.tableplus/settings/connections.json”: No such file or directory Error: Error opening file “/home/zerdox/.tableplus/settings/settings.json”: No such file or directory Error: Error opening file “/home/zerdox/.tableplus/settings/connections.json”: No such file or directory ```Expected behaviour:
App stores settings in
~/.config/tableplus/
folder, cache in~/.cache/tableplus/
folder, etc.Actual behaviour:
App tries to create it's own dotfolder in my home directory which is disrespectful to user and specifications.
Additional info:
You can learn about XDG spec: here - https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html here - https://wiki.archlinux.org/title/XDG_Base_Directory and here - https://soc.me/standards/defending-home
Fallback also needs to be implemented for legacy path and for older versions.
I can guess
.tableplus/settings/settings.json
should be located in.config/tableplus/
and.tableplus/settings/connections.json
in.local/share/tableplus/
.If you don't want to migrate all users to new path and still want to litter their home directory, just add ability to redefine paths using envs like this (workaround for less and node for example below):
Then I'll add new envs to your app as workaround to this issue.
Thank you!