aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/salvage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/salvage.cpp')
-rw-r--r--src/wallet/salvage.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/salvage.cpp b/src/wallet/salvage.cpp
index e6e62332c0..af57210f01 100644
--- a/src/wallet/salvage.cpp
+++ b/src/wallet/salvage.cpp
@@ -5,6 +5,7 @@
#include <fs.h>
#include <streams.h>
+#include <util/translation.h>
#include <wallet/salvage.h>
#include <wallet/wallet.h>
#include <wallet/walletdb.h>
@@ -20,8 +21,9 @@ bool RecoverDatabaseFile(const fs::path& file_path)
std::string filename;
std::shared_ptr<BerkeleyEnvironment> env = GetWalletEnv(file_path, filename);
- if (!env->Open(true /* retry */)) {
- tfm::format(std::cerr, "Error initializing wallet database environment %s!", env->Directory());
+ bilingual_str open_err;
+ if (!env->Open(open_err)) {
+ tfm::format(std::cerr, "%s\n", open_err.original);
return false;
}