gfsec-split config file path error
There is a discrepancy between gfsec-split and gfsec-use with the config option.
The documentation states that « If FILE is a single filename without extension and without a directory part, the file will be placed under the DG_CONFIG_HOME/gfsecret directory with a .conf extension. »
If I run:
$ gfsec-split -c test testfile URI1 URI2 URI3 gfsec-split: Cannot write configuration file: No such file or directory
With an existing configuration file in $HOME/.config/gfsecret/test.conf:
$ gfsec-use -c test $ # new bash session with file recombined
I guess the error is in gfsec-split because the freedesktop's XDG Base Directory Specification states that « $XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used. »
gfsec-split.c the configuration file just check the
XDG_CONFIG_HOME variable but set an empty string if not set resulting in
/gfsecret/test.conf configuration filename whereas
gfsec-use.c check that
XDG_CONFIG_HOME is set or fallback to the expected
OK, there’s two different issues here.
The first is that as you have noticed, gfsec-split does not adequately fallback to
XDG_CONFIG_HOME is not set.
But there’s also a second issue: when attempting to create the configuration file, gfsec-split expects the parent directory to already exist. If that parent directory does not exist, gfsec-split fails with the
ENOENT error, even if the
XDG_CONFIG_HOME variable is properly set or if gfsec-split were to fallback to
That second issue is not necessarily a bug per se, but at the very least it’s a very surprising behavior: most users would expect the program to create the configuration directory as needed instead of requiring the user to create it beforehand.
Deleting a branch is permanent. It CANNOT be undone. Continue?