Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Canonicalize --user-data-dir path to match file watcher events (#48470)
Dino7377cb65542b
diff --git a/crates/paths/src/paths.rs b/crates/paths/src/paths.rsindex 1fc6ce50e40..02275d8cbd2 100644--- a/crates/paths/src/paths.rs+++ b/crates/paths/src/paths.rs@@ -69,15 +69,10 @@ pub fn set_custom_data_dir(dir: &str) -> &'static PathBuf {panic!("set_custom_data_dir called after data_dir or config_dir was initialized");}CUSTOM_DATA_DIR.get_or_init(|| {- let mut path = PathBuf::from(dir);- if path.is_relative() && path.exists() {- let abs_path = path- .canonicalize()- .expect("failed to canonicalize custom data directory's path to an absolute path");- path = util::paths::SanitizedPath::new(&abs_path).into()- }+ let path = PathBuf::from(dir);std::fs::create_dir_all(&path).expect("failed to create custom data directory");- path+ path.canonicalize()+ .expect("failed to canonicalize custom data directory's path to an absolute path")})}