From d664d1dec066eb1bd237af61c22b62d93b48646b Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Thu, 3 Jun 2021 00:19:56 +0800 Subject: Default log file to cache --- helix-core/src/lib.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'helix-core') diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs index d5b0cd15..3e00081f 100644 --- a/helix-core/src/lib.rs +++ b/helix-core/src/lib.rs @@ -58,13 +58,22 @@ pub fn runtime_dir() -> std::path::PathBuf { pub fn config_dir() -> std::path::PathBuf { // TODO: allow env var override - use etcetera::base_strategy::{choose_base_strategy, BaseStrategy}; let strategy = choose_base_strategy().expect("Unable to find the config directory!"); let mut path = strategy.config_dir(); path.push("helix"); path } +pub fn cache_dir() -> std::path::PathBuf { + // TODO: allow env var override + let strategy = choose_base_strategy().expect("Unable to find the config directory!"); + let mut path = strategy.cache_dir(); + path.push("helix"); + path +} + +use etcetera::base_strategy::{choose_base_strategy, BaseStrategy}; + pub use ropey::{Rope, RopeSlice}; pub use tendril::StrTendril as Tendril; -- cgit v1.2.3-70-g09d2