Implement global settings file (#30444)
Adds a `global_settings.json` file which can be set up by enterprises with automation, enabling setting settings like edit provider by default without interfering with user's settings files. Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
parent
c6e69fae17
commit
90c2d17042
4 changed files with 210 additions and 40 deletions
|
@ -191,6 +191,12 @@ pub fn settings_file() -> &'static PathBuf {
|
|||
SETTINGS_FILE.get_or_init(|| config_dir().join("settings.json"))
|
||||
}
|
||||
|
||||
/// Returns the path to the global settings file.
|
||||
pub fn global_settings_file() -> &'static PathBuf {
|
||||
static GLOBAL_SETTINGS_FILE: OnceLock<PathBuf> = OnceLock::new();
|
||||
GLOBAL_SETTINGS_FILE.get_or_init(|| config_dir().join("global_settings.json"))
|
||||
}
|
||||
|
||||
/// Returns the path to the `settings_backup.json` file.
|
||||
pub fn settings_backup_file() -> &'static PathBuf {
|
||||
static SETTINGS_FILE: OnceLock<PathBuf> = OnceLock::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue