aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client/src/record
diff options
context:
space:
mode:
Diffstat (limited to 'crates/atuin-client/src/record')
-rw-r--r--crates/atuin-client/src/record/sqlite_store.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/atuin-client/src/record/sqlite_store.rs b/crates/atuin-client/src/record/sqlite_store.rs
index a3e7228b..03b5e448 100644
--- a/crates/atuin-client/src/record/sqlite_store.rs
+++ b/crates/atuin-client/src/record/sqlite_store.rs
@@ -41,11 +41,10 @@ impl SqliteStore {
std::process::exit(1);
}
- if !path.exists() {
- if let Some(dir) = path.parent() {
+ if !path.exists()
+ && let Some(dir) = path.parent() {
fs::create_dir_all(dir)?;
}
- }
let opts = SqliteConnectOptions::from_str(path.as_os_str().to_str().unwrap())?
.journal_mode(SqliteJournalMode::Wal)