Skip to content

Commit

Permalink
change history.txt dir
Browse files Browse the repository at this point in the history
  • Loading branch information
dvishal485 committed Nov 29, 2023
1 parent 61a6cd8 commit 9118b82
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cli/src/repl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ pub fn start(parser: &mut parser::Context, precision: u32) {

// Load history
let mut history_path = None;
if let Some(config_path) = dirs::config_dir() {
let mut config_path = config_path;
config_path.push("kalker");
if fs::create_dir_all(config_path.as_path()).is_ok() {
config_path.push("history.txt");
let history = config_path.into_os_string().into_string().unwrap();
if let Some(cache_path) = dirs::cache_dir() {
let mut cache_path = cache_path;
cache_path.push("kalker");
if fs::create_dir_all(cache_path.as_path()).is_ok() {
cache_path.push("history.txt");
let history = cache_path.into_os_string().into_string().unwrap();
editor.load_history(&history).ok();
history_path = Some(history)
}
Expand Down

0 comments on commit 9118b82

Please sign in to comment.