Closed hxzhao527 closed 2 years ago
Could you point out the part that would make it unstable?
emm, it is the travel order
. Now it is implemented that list $HOME
first, then config_dirs
.
In document, https://github.com/whitequark/rust-xdg/blob/c2921e01ad47759fdffcbd77cb7e595936b923ad/src/lib.rs#L523-L525 it is not clear where is the first occurence
.
If I remember correctly, this function implements the following part of the XDG Base Directories spec:
The order of base directories denotes their importance; the first directory listed is the most important. When the same information is defined in multiple places the information defined relative to the more important base directory takes precedent. The base directory defined by $XDG_DATA_HOME is considered more important than any of the base directories defined by $XDG_DATA_DIRS. The base directory defined by $XDG_CONFIG_HOME is considered more important than any of the base directories defined by $XDG_CONFIG_DIRS.
(from Environment variables).
If I remember correctly, this function implements the following part of the XDG Base Directories spec:
The order of base directories denotes their importance; the first directory listed is the most important. When the same information is defined in multiple places the information defined relative to the more important base directory takes precedent. The base directory defined by $XDG_DATA_HOME is considered more important than any of the base directories defined by $XDG_DATA_DIRS. The base directory defined by $XDG_CONFIG_HOME is considered more important than any of the base directories defined by $XDG_CONFIG_DIRS.
(from Environment variables).
thanks. no more question.
Now the method
list_config_files_once
impl: https://github.com/whitequark/rust-xdg/blob/c2921e01ad47759fdffcbd77cb7e595936b923ad/src/lib.rs#L728-L745travel
$HOME
first.But is it stable?
e.g. Autostart Directories depends on the travel order.