-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support for XDG variables with multiple paths #9
Comments
Yes, 1 + 2.ii. sounds great. |
Okay, I’m working on a PR. The implementation functions and the new multi-path getter functions will return a |
vec1 is an overkill. Regular vec should be enough. |
robinkrahl
added a commit
to robinkrahl/app_dirs2
that referenced
this issue
Aug 5, 2020
Previously, the get_app_dir function defined by the implementations returned a single PathBuf. But as discussed in issue 9 [0], there might be multiple base directories. For example, the unix implementation uses the XDG Base Directory Specification which supports multiple shared config and data directories. [0] app-dirs-rs#9 With this patch, we rename the internal get_app_dir function to get_app_dirs and change its return type to Vec<PathBuf> to enable handling multiple app directories.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue for app_dirs
The XDG Base Directory Specification allows multiple values for the
XDG_DATA_DIRS
andXDG_CONFIG_DIRS
variables that store the location of the shared data. Implementers of the specification should look for configuration files in all of the specified directories.app_dirs2
currently always uses the first entry of the variables and ignores the rest. To makeapp_dirs2
compliant with the specification, you would have to make two changes:app_dirs2
should at least check whether an application directory already exists in one of the specified directories. This would only require changes to the internal lookup implementations and would not break the public API.app_dirs2
should make it possible to query all available data directories.SharedConfig
andSharedData
.get_data_roots
,get_app_roots
andget_app_dirs
.What do you think? Would you accept a PR that implements 1 + 2.ii.?
The text was updated successfully, but these errors were encountered: