···3636 let mut cfg = safir.get_config();
3737 cfg.mode = mode;
3838 cfg.write().context("writing config out")?;
3939+ println!(
4040+ "Set store mode to: '{:?}'\nActive on the next run of Safir!",
4141+ cfg.mode
4242+ );
3943 }
4044 }
4145
+1-13
src/utils.rs
···55 path::{Path, PathBuf},
66};
7788-/// Debug flag for testing without affecting my existing store
99-const DEBUG: bool = true;
1010-118/// Type to represent a KVPair
129pub type KVPair = (String, String);
1310···70677168/// Create the .safirstore directory in the user HOME
7269pub fn load_safir_workspace() -> PathBuf {
7373- let store_dir = if DEBUG {
7474- ".debug_safirstore"
7575- } else {
7676- ".safirstore"
7777- };
7878-7970 match dirs::home_dir() {
8071 Some(home) => {
8181- let working_dir = home.join(store_dir);
8282- if DEBUG && !working_dir.exists() {
8383- println!("DEBUG: Creating safir store at debug location");
8484- }
7272+ let working_dir = home.join(".safirstore");
8573 fs::create_dir_all(&working_dir).expect("unable to create main directory");
86748775 working_dir