Add zed
to Flatpak config and data directories (#28952)
Closes #28944 Release Notes: - linux: Fixed incorrect config directory being used when Zed is installed via Flatpak Signed-off-by: Marko Kungla <marko.kungla@gmail.com>
This commit is contained in:
parent
703a68eedf
commit
8f308d835a
1 changed files with 4 additions and 6 deletions
|
@ -74,10 +74,9 @@ pub fn config_dir() -> &'static PathBuf {
|
|||
if let Ok(flatpak_xdg_config) = std::env::var("FLATPAK_XDG_CONFIG_HOME") {
|
||||
flatpak_xdg_config.into()
|
||||
} else {
|
||||
dirs::config_dir()
|
||||
.expect("failed to determine XDG_CONFIG_HOME directory")
|
||||
.join("zed")
|
||||
dirs::config_dir().expect("failed to determine XDG_CONFIG_HOME directory")
|
||||
}
|
||||
.join("zed")
|
||||
} else {
|
||||
home_dir().join(".config").join("zed")
|
||||
}
|
||||
|
@ -95,10 +94,9 @@ pub fn data_dir() -> &'static PathBuf {
|
|||
if let Ok(flatpak_xdg_data) = std::env::var("FLATPAK_XDG_DATA_HOME") {
|
||||
flatpak_xdg_data.into()
|
||||
} else {
|
||||
dirs::data_local_dir()
|
||||
.expect("failed to determine XDG_DATA_HOME directory")
|
||||
.join("zed")
|
||||
dirs::data_local_dir().expect("failed to determine XDG_DATA_HOME directory")
|
||||
}
|
||||
.join("zed")
|
||||
} else if cfg!(target_os = "windows") {
|
||||
dirs::data_local_dir()
|
||||
.expect("failed to determine LocalAppData directory")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue