diff --git a/libdevcrypto/SecretStore.cpp b/libdevcrypto/SecretStore.cpp index e7409ca15..86e378589 100644 --- a/libdevcrypto/SecretStore.cpp +++ b/libdevcrypto/SecretStore.cpp @@ -88,7 +88,8 @@ static js::mValue upgraded(string const& _s) SecretStore::SecretStore(string const& _path): m_path(_path) { - load(); + if (!m_path.empty()) + load(); } bytes SecretStore::secret(h128 const& _uuid, function const& _pass, bool _useCache) const @@ -137,6 +138,9 @@ void SecretStore::clearCache() const void SecretStore::save(string const& _keysPath) { + if (_keysPath.empty()) + return; + fs::path p(_keysPath); fs::create_directories(p); for (auto& k: m_keys)