From d74ac7e20061cc353590b9b61977ec3aae334aba Mon Sep 17 00:00:00 2001 From: NerdyPepper Date: Fri, 16 Aug 2019 11:06:09 +0530 Subject: use cache dir --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index c9debe5..38f4837 100644 --- a/src/main.rs +++ b/src/main.rs @@ -62,8 +62,10 @@ fn main() { // handle history storage let eva_dirs = ProjectDirs::from("com", "NerdyPepper", "eva").unwrap(); let eva_data_dir = eva_dirs.data_dir(); + let eva_cache_dir = eva_dirs.cache_dir(); let mut history_path = PathBuf::from(eva_data_dir); - let mut previous_ans_path = PathBuf::from(eva_data_dir); + let mut previous_ans_path = PathBuf::from(eva_cache_dir); + match create_dir_all(eva_data_dir) { Ok(_) => { history_path.push("history.txt"); -- cgit v1.2.3