summaryrefslogtreecommitdiff
path: root/src/environment.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-08-01 10:48:28 +0200
committerpml68 <contact@pml68.dev>2025-08-01 10:48:28 +0200
commit87144ed40a791790741b56628a7cf1663a193c65 (patch)
tree6ef92775e23bde863d0e15b24e83df3c058fb101 /src/environment.rs
parentfeat: make "Copy Code" button appear on hover over the code (diff)
downloadiced-builder-87144ed40a791790741b56628a7cf1663a193c65.tar.gz
feat: update `iced_material`, use new reactive system theme
Diffstat (limited to '')
-rw-r--r--src/environment.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/environment.rs b/src/environment.rs
index 8efc425..33c316d 100644
--- a/src/environment.rs
+++ b/src/environment.rs
@@ -49,9 +49,11 @@ fn platform_specific_config_dir() -> PathBuf {
#[cfg(target_os = "macos")]
#[inline(always)]
fn xdg_config_dir() -> Option<PathBuf> {
- let config_dir = xdg::BaseDirectories::with_prefix("iced-builder")
- .ok()
- .and_then(|xdg| xdg.find_config_file(CONFIG_FILE_NAME))?;
+ let config_path = xdg::BaseDirectories::new().config_home?;
+ let config_dir = config_path.join("iced-builder");
- config_dir.parent().map(|p| p.to_path_buf())
+ config_dir
+ .join(CONFIG_FILE_NAME)
+ .is_file()
+ .then_some(config_dir)
}