Linux config directory should follow XDG Base Directory Specification
Moderator: ickputzdirwech
Linux config directory should follow XDG Base Directory Specification
Not a bug per se, but it'd be greatly appreciated if the path was calculated from env vars as per the XDG Base Directory spec (my other Steam games use ~/.local/share/<game> i.e. $XDG_DATA_HOME).
Re: [0.17.62] Linux config dir is $HOME/.factorio
I will move this to ideas and suggestions
Re: [0.17.62] Linux config dir is $HOME/.factorio
+1. I don't particularly hate having it at ~/.factorio, but it's probably time to modernize.
Re: [0.17.62] Linux config dir is $HOME/.factorio
since this should get rid of part 1 of 2 of my patch (part 2 is a bit more exotic)
Backwards compatibility could be achieved by simply checking whether $HOME/.factorio exists and if that's not the case, use the XDG directories.
Backwards compatibility could be achieved by simply checking whether $HOME/.factorio exists and if that's not the case, use the XDG directories.
Re: Linux config directory should follow XDG Base Directory Specification
You can just set the folder the game uses through the config.ini file and config-path.cfg file. https://wiki.factorio.com/Application_directory
If you want to get ahold of me I'm almost always on Discord.
Re: Linux config directory should follow XDG Base Directory Specification
That's not the same as the mechanism in the XDG base directory specification:Rseding91 wrote: ↑Tue Jan 12, 2021 1:06 am You can just set the folder the game uses through the config.ini file and config-path.cfg file. https://wiki.factorio.com/Application_directory
With the path config, you can only set one of these variants, but in order to correctly handle the fallback you need to add an additional wrapper (or well, patch the binary itself, like mentioned above) which handles that logic.$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.