create provided custom dir for keys if none

This commit is contained in:
NikVolf 2016-04-10 14:20:48 +03:00
parent 46a25b31ab
commit 219e88a023
1 changed files with 1 additions and 0 deletions

View File

@ -184,6 +184,7 @@ impl SecretStore {
/// new instance of Secret Store in specific directory
pub fn new_in(path: &Path) -> Self {
::std::fs::create_dir_all(&path).expect("Cannot access requested key directory - critical");
SecretStore {
directory: KeyDirectory::new(path),
unlocks: RwLock::new(HashMap::new()),