New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POSIX: Follow XDG Base Directory Specification for User's Files #656
Conversation
97b7ff1
to
4edc015
Compare
| if (prefix) { | ||
| path = prefix; | ||
| path += '/'; | ||
| path += dir; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any catches for '../../../'? Or these should be fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine, mkdir uses the CWD as base if the path is not absolute.
|
In general, I had a good impression, and think that this could make it to 1.8.0 |
|
OK, please update the patch (now it has conflicts) and merge. |
This is kind of like 'mkdir -p' now. But the permissions are different from standard POSIX behavior.
4edc015
to
5da7a1b
Compare
This makes use use the XDG Base Directory Specification for the log file path. This tackles one part of bug #6036 "POSIX: Use XDG dirs instead of HOME".
…/scummvm.ini'. This is what the XDG Base Directory Specification suggests to use. We still use the old location of '~/.scummvmrc' in case that is present. This tackles an aspect of bug #6036 "POSIX: Use XDG dirs instead of HOME".
This is what the XDG Base Directory Specification suggests to use. We still use ~/.scummvm as default path in case the directory exists. This tackles an aspect of bug #6036 "POSIX: Use XDG dirs instead of HOME".
5da7a1b
to
7d014be
Compare
POSIX: Follow XDG Base Directory Specification for User's Files
This patch makes our POSIX ports use locations for configuration, log, and save games conforming to the XDG Base Directory Specification version 0.8 (right now the latest version, which can be found here).
The new locations are as follows:
$XDG_CONFIG_HOME/scummvm/scummvm.ini$XDG_DATA_HOME/scummvm/saves/$XDG_CACHE_HOME/scummvm/scummvm.logWe still use the old locations for the configuration file and the savegame directory if those exist from a previous ScummVM installation.
This 'fixes' bug #6036 POSIX: Use XDG dirs instead of HOME. There is some discussion on the bug report about using a more easily visible location for save files. If we want that, we should do go for it now instead of having to worry about it again later.