From db88799cf93093fd3e62fb7e9725262d6f23bb55 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 12 Jun 2015 07:35:48 +0200 Subject: [PATCH] Try not to write files in tests. --- libdevcrypto/SecretStore.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)