Testing them now with sys.get_save_file(“appname”, “filename”)
Windows
%appdata%\Roaming\appname\filename
OS X
~/Library/Application Support/appname/filename
Linux
~/.appname/filename BAD! This should be placed under ~/.config/appname/filename
It’s my understanding Linux users prefer this, to keep their user folder less cluttered. Solution is to maybe detect Linux target and set the “appname” part to “config/appname” if that’s possible? Edit: tested this to make sure for anyone who cares and it appears to work fine to save in ~/.config/appname/filename instead of the default dir.
Android
/data/data/com.packagename/files/filename
So the first field is ignored? That’s somewhat understandable based on the inclusion of the package name in the path, but it’s inconsistent compared to others… but probably too late to change now.
You’re right that ~/.appname is bad, but the ~/.config directory is not a standardised directory for UNIX-like operating systems. According to the Filesystem Hierarchy Standard (that we all know by heart and love), variable game data should be placed under /var/games. Before the Filesystem Hierarchy Standard was in place, it should have been placed somewhere under /usr.
Sorry for posting in thread marked as solved, but I don’t see it being solved.
Any updates/plans to address linux path that’s returned by sys.get_save_file?
It’s worth looking at what other engines or popular games are using for saves on Linux. Even if there’s no definitive agreement, almost anything will be better than ~/.appname IMO.
For non-steam games it’s almost always ~/.local/share/appname from my experience.
It’s not a blocking issue, as I can save to any directory manually, but this was bothering me as this is the default and cross-platform way of doing this in the engine.