Closed Omnisthetics closed 9 months ago
Will this load the config file from the current directory for those already have it there? I think it would need something like: const string IniFile = "config.ini"; if (File.Exists(IniFile)) return IniFile;
No, it will not but that's the point. In most cases, Linux applications are installed via package managers into directories the user doesn't have direct write access to, so best practice is to prioritise managing user data in their home directory, regardless of whether the app is portable or installed via a package manager. For full context, I plan on making an AUR package for Helion.
It'll be a bit annoying initially for those running Helion on Linux but its easy enough use the -config
arg or even just move their config file to $HOME/.config/helion
and never worry about it again.
Updated the default config path for Linux to comply with the XDG Base Directory Specification which is to save config files using
$XDG_CONFIG_HOME
and, if empty or not set, fallback to$HOME/.config
.If neither environment variables are usable, the config is saved to the current directory.