dat-ecosystem / dat

:floppy_disk: peer-to-peer sharing & live syncronization of files via command line
https://dat.foundation
BSD 3-Clause "New" or "Revised" License
8.24k stars 449 forks source link

Store Dat config data, secret keys, etc. in default platform folders #1093

Open RangerMauve opened 5 years ago

RangerMauve commented 5 years ago

As mentioned on IRC (thanks @da2x ), it'd be good for Dat to avoid putting folders into the home directory and to instead follow the standards used by other applications like XDG.

We could make use of the platform-folders module in order to move the dat secret keys and other relevant storage somewhere that makes sense for the user's OS.

Some considerations:

Also related to #1063

This will probably involve a change to dat-storage. Maybe we can have it search for ~/.dat as a fallback and create new keys in the appropriate dir.

joehand commented 5 years ago

Also may look at https://github.com/sindresorhus/env-paths and https://github.com/sindresorhus/conf