diff options
author | NerdyPepper <[email protected]> | 2019-08-16 06:36:09 +0100 |
---|---|---|
committer | NerdyPepper <[email protected]> | 2019-08-16 06:36:09 +0100 |
commit | d74ac7e20061cc353590b9b61977ec3aae334aba (patch) | |
tree | a11e8d1214a98a2da311d178cd3b2d00bdfac85a /src | |
parent | 943e085949ac50597a7386dc19ed84e39a9ce201 (diff) |
use cache dir
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 4 |
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"); |