From 7246a0f39ce1f529d4e041c3316491e96152f1fe Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Tue, 17 Sep 2024 13:51:11 -0400 Subject: [PATCH] macos: Use ~/Library/Caches/Zed instead of ~/.cache/zed (#17949) --- crates/paths/src/paths.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/paths/src/paths.rs b/crates/paths/src/paths.rs index b80bef5f2d..7f662d0325 100644 --- a/crates/paths/src/paths.rs +++ b/crates/paths/src/paths.rs @@ -59,6 +59,12 @@ pub fn support_dir() -> &'static PathBuf { pub fn temp_dir() -> &'static PathBuf { static TEMP_DIR: OnceLock = OnceLock::new(); TEMP_DIR.get_or_init(|| { + if cfg!(target_os = "macos") { + return dirs::cache_dir() + .expect("failed to determine cachesDirectory directory") + .join("Zed"); + } + if cfg!(target_os = "windows") { return dirs::cache_dir() .expect("failed to determine LocalAppData directory")