Open
Conversation
Implements nicm#96 https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html If no configuration file is specified on the command-line, $XDG_CONFIG_HOME/fdm.conf is now the first file checked, then $HOME/.fdm.conf, and finally the system-wide /etc/fdm.conf. This allows the user to specify where they would like the configuration file to be stored. E.g. many users like to set XDG_CONFIG_HOME to $HOME/.config so that all their XDG-compliant programs have their configuration files stored there rather than in their home directory (or other arbitrary locations).
Continuation of nicm#96 implementation. From https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html: > There is a single base directory relative to which user-specific > runtime files and other file objects should be placed. This directory > is defined by the environment variable $XDG_RUNTIME_DIR. This also may provide slight performance benefits to this as XDG_RUNTIME_DIR is often set to a directory under /tmp which some systems configure to be mounted as tmpfs. If XDG_RUNTIME_DIR is not set or is an empty string, the old behaviour of the user's home directory is used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant issue: #96
This patch implements support for the XDG base directory specification. This will not affect existing user configurations, but instead extends fdm to allow the user to specify an fdm.conf file in their $XDG_CONFIG_HOME directory (often ~/.config). fdm now also will store it's fdm.lock lock file in $XDG_RUNTIME_DIR (e.g. /tmp/XXXX.runtime-dir.XXX) if it is set, and if not, will use the old behaviour of storing the lock file in the home directory.
The patch does not modify the behaviour of other "temporary files"--they are still stored in /tmp or under $TMPDIR like before.