aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNerdyPepper <[email protected]>2019-08-16 06:36:09 +0100
committerNerdyPepper <[email protected]>2019-08-16 06:36:09 +0100
commitd74ac7e20061cc353590b9b61977ec3aae334aba (patch)
treea11e8d1214a98a2da311d178cd3b2d00bdfac85a
parent943e085949ac50597a7386dc19ed84e39a9ce201 (diff)
use cache dir
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
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() {
62 // handle history storage 62 // handle history storage
63 let eva_dirs = ProjectDirs::from("com", "NerdyPepper", "eva").unwrap(); 63 let eva_dirs = ProjectDirs::from("com", "NerdyPepper", "eva").unwrap();
64 let eva_data_dir = eva_dirs.data_dir(); 64 let eva_data_dir = eva_dirs.data_dir();
65 let eva_cache_dir = eva_dirs.cache_dir();
65 let mut history_path = PathBuf::from(eva_data_dir); 66 let mut history_path = PathBuf::from(eva_data_dir);
66 let mut previous_ans_path = PathBuf::from(eva_data_dir); 67 let mut previous_ans_path = PathBuf::from(eva_cache_dir);
68
67 match create_dir_all(eva_data_dir) { 69 match create_dir_all(eva_data_dir) {
68 Ok(_) => { 70 Ok(_) => {
69 history_path.push("history.txt"); 71 history_path.push("history.txt");