diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-05-13 15:39:39 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-05-13 15:39:39 +0200 |
commit | f77e71462d27181760bd1fe4eb5a5b34594e58a2 (patch) | |
tree | 32f4bfe328e6b3411f93aa38154b00ba53863a25 | |
parent | 8f4a7c744ea1363297953718a37774c2824b71b6 (diff) |
core, ipc: Defer the creation of the home directory.
- Fixes #271.
-rw-r--r-- | core/src/lib.rs | 2 | ||||
-rw-r--r-- | ipc/src/lib.rs | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/core/src/lib.rs b/core/src/lib.rs index 955496a1..a3b6010e 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -24,7 +24,6 @@ extern crate tempdir; extern crate failure; use std::fmt; -use std::fs; use std::io; use std::path::{Path, PathBuf}; use tempdir::TempDir; @@ -221,7 +220,6 @@ impl Config { format_err!("Failed to get users home directory"))? .join(".sequoia"); } - fs::create_dir_all(c.home())?; } Ok(c) } diff --git a/ipc/src/lib.rs b/ipc/src/lib.rs index 70ef3cf1..a9a89b82 100644 --- a/ipc/src/lib.rs +++ b/ipc/src/lib.rs @@ -149,6 +149,7 @@ impl Descriptor { Ok(rpc_system) }; + fs::create_dir_all(self.ctx.home())?; let mut file = fs::OpenOptions::new() .read(true) .write(true) |