create provided custom dir for keys if none

This commit is contained in:
NikVolf
2016-04-10 14:20:48 +03:00
committed by arkpar
parent 37eb0fb04e
commit 6d5809757f

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()),