diff --git a/crates/paths/src/paths.rs b/crates/paths/src/paths.rs index 1fc6ce50e40bc9f2fcee41f606ac8c40bfc60b26..02275d8cbd26ab86435476c5adeaf81ec09a29e9 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") }) }