-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support XDG layout on Linux #66
Comments
Thanks for your feedback. Could you please share full samples for me because I am not that much familiar with Linux. Changing the directories will also require a migration component which will move the existing files around (or at least tries to read from the previous location etc.) |
It basically boils down to separating the various types of data which currently goes into `$HOME/.MQTTnetApp`.
- `$XDG_CONFIG_HOME/mqttnetapp', this would be the actual configuration with the files Connections.json,
Publish.json and Subscriptions.json
- `XDG_CACHE_HOME/mqttnetapp', this is for any state data that can basically be deleted any time without anything negative consequences
- `XDG_DATA_HOME/mqttnetapp', data that you want to keep but is not strictly configuration
Other applications that have made this transition (and there’s quite a lot) have been following different approaches that basically boil down to:
1. if neither `$XDG_CONFIG_HOME/mqttnetapp' nor `$HOME/.MQTTnetApp' exist (because it’s the first run), use the new location
2. if both exist, error out
3. if the legacy location exists, either:
1. move the files into the new locations, or
2. continue using the legacy location
Apologies for the borked formatting.
|
@peterhoeg Do you plan to update the package in NixOS? |
Thanks for the fix! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, we get a directory named
$HOME/.MQTTnetApp
i which the various configuration files are written.It would be great to follow the XDG Base Directory Specification https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html so as to not pollute
$HOME
.Secondly, the casing is rather annoying on a case-sensitive file system where application directories are typically kept lower case.
bash
as an example will not auto-complete that out-of-the-box unless you get the casing right when typing the first letters.The text was updated successfully, but these errors were encountered: