Closed jackbashford closed 5 months ago
If this change were to be merged, all existing users would lose their settings after an update.
In that case, does the following checklist satisfy all possibilities?
$HOME
, the current behaviour) then those should be used, as is the current behaviour.$XDG_CONFIG_HOME
is set then use that as the location of the settings file. (the behaviour I have in my PR)
b. If the environment variable $XDG_CONFIG_HOME
is not set, then use $HOME
as the location of the settings file.This can be logically restructured to read 'if no configuration file exists under $HOME
and the $XDG_CONFIG_HOME
environment variable exists, then place the configuration file in $XDG_CONFIG_HOME
, otherwise use $HOME
'.
This should hopefully mean no deletion of settings files, but if a user wishes to use the XDG directory, they can simply move their settings file to the desired location and it will be recognised. Or am I missing something?
I think that would work.
I've added that functionality now, and mvn verify
still passes. I've also checked that it handles the expected cases/scenarios correctly, including no noticeable changes when you load settings from the current release into my patched version (i.e. settings still transfer successfully and are not overwritten, even with $XDG_CONFIG_HOME
set.)
Use XDG_CONFIG_HOME (if defined) to store digital.cfg file instead of HOME. Fixes #1070.
Successfully passes
mvn verify
.