Compliance with XDG specifications on UNIX systems#2616
Compliance with XDG specifications on UNIX systems#2616mochaaP wants to merge 1 commit intopraat:masterfrom
Conversation
Signed-off-by: Zephyr Lykos <git@mochaa.ws>
|
Would be nice to get this in. I imagine it hasn't been merged because it's a breaking change - could melder_files.cpp be made to check for an existing ~/.praat_dir before creating the preferences directory in the new location? |
|
Mmm, none of the 11 Linuxes that I tried have the |
|
$HOME/.config is indeed the default for $XDG_CONFIG_HOME, but the variable can be changed. I wouldn't recommend hardcoding it in the new location either, but maybe look at what other C++ applications do. |
|
The XDG Base Directory Specification suggests that
(For Windows, from Vista onward, |
|
I'd love to see this get some traction, though I know this PR is somewhat old now. The XDG Base Directory compliance has been a stable, well-established convention on Linux for quite some time, and it would be a nice improvement for Linux users, even if largely just a cosmetic one. To clarify for @PaulBoersma regarding your earlier comment:
This is actually expected behavior. The XDG Base Directory Specification intentionally defines XDG_CONFIG_HOME as unset by default, with applications expected to fall back to ~/.config/ when the variable is absent. This is the explanation for your observation that many folders (eg. I would be happy to write a shim in the UNIX case that would check for the existing folder with the XDG_CONFIG_HOME handling as the fallback, if this is something you would consider is appropriate now. |
Notice: this is a breaking change. Users need to move their files from
.praat-dirto.config/praat.