On Linux it seems that Factorio uses
Code: Select all
getpwuid(getuid())->pw_dir + "/.factorio"
Typically, XDG's paths are preferable, but failing that I believe using $HOME is much preferred over getpwuid() since it's easier to work with.
What I'd like:
1. For Factorio to instead use XDG paths as "__PATH__system-write-data__" values: $XDG_CONFIG_HOME/factorio.ini for Factorio's config file, $XDG_CACHE_HOME/factorio for the "temp" folder and "crop-cache.dat", and $XDG_DATA_HOME/factorio for probably everything else? I think that's how it goes, I dunno. Somebody should spend more than 5 seconds thinking about good XDG compliance.
2. Don't like that? It is a big change, so here's a compromise: Use "$HOME/.factorio", falling back to getpwuid(getuid())->pw_dir if $HOME isn't defined.
P.S. Thank you so much for using /usr/share/factorio as "__PATH__system-read-data__"