aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-04-29 08:06:53 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-04-29 08:06:55 -0400
commit150be1c7b3432df19a7be6f1ce486723887a0fdc (patch)
tree9a22403473c07b273ad98d857eb0b08790044c54 /src
parent3a0d6da098c77703f30bb6bbd58c1d42390c469f (diff)
parent70c1cf8c1c07091544d060191715027282e87b57 (diff)
downloadbitcoin-150be1c7b3432df19a7be6f1ce486723887a0fdc.tar.xz
Merge #15917: wallet: Avoid logging no_such_file_or_directory error
70c1cf8c1c wallet: Avoid logging no_such_file_or_directory error (João Barbosa) Pull request description: Avoid logging `IsBerkeleyBtree: No such file or directory ...`. The result of `IsBerkeleyBtree` is the same since `fs::file_size()` returns 0 for non existent files. Fix #15912. ACKs for commit 70c1cf: practicalswift: utACK 70c1cf8c1c07091544d060191715027282e87b57 jonasschnelli: utACK 70c1cf8c1c07091544d060191715027282e87b57 Empact: utACK https://github.com/bitcoin/bitcoin/pull/15917/commits/70c1cf8c1c07091544d060191715027282e87b57 Tree-SHA512: 964a64fff9a17b805a1570884cdb2beb82283498f790b0464e011791803ae7f37dba213320c76a920dd92b2b972a7640e6277ecf470400734149dc8f9f9f1d6d
Diffstat (limited to 'src')
-rw-r--r--src/wallet/walletutil.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/walletutil.cpp b/src/wallet/walletutil.cpp
index 2d8adf8ba6..b227a15556 100644
--- a/src/wallet/walletutil.cpp
+++ b/src/wallet/walletutil.cpp
@@ -31,6 +31,8 @@ fs::path GetWalletDir()
static bool IsBerkeleyBtree(const fs::path& path)
{
+ if (!fs::exists(path)) return false;
+
// A Berkeley DB Btree file has at least 4K.
// This check also prevents opening lock files.
boost::system::error_code ec;