Skip to content

Commit 150be1c

Browse files
author
MarcoFalke
committed
Merge #15917: wallet: Avoid logging no_such_file_or_directory error
70c1cf8 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 70c1cf8 jonasschnelli: utACK 70c1cf8 Empact: utACK bitcoin/bitcoin@70c1cf8 Tree-SHA512: 964a64fff9a17b805a1570884cdb2beb82283498f790b0464e011791803ae7f37dba213320c76a920dd92b2b972a7640e6277ecf470400734149dc8f9f9f1d6d
2 parents 3a0d6da + 70c1cf8 commit 150be1c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/wallet/walletutil.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ fs::path GetWalletDir()
3131

3232
static bool IsBerkeleyBtree(const fs::path& path)
3333
{
34+
if (!fs::exists(path)) return false;
35+
3436
// A Berkeley DB Btree file has at least 4K.
3537
// This check also prevents opening lock files.
3638
boost::system::error_code ec;

0 commit comments

Comments
 (0)