Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletutil.cpp
Show All 24 Lines | if (gArgs.IsArgSet("-walletdir")) { | ||||
path /= "wallets"; | path /= "wallets"; | ||||
} | } | ||||
} | } | ||||
return path; | return path; | ||||
} | } | ||||
static bool IsBerkeleyBtree(const fs::path &path) { | static bool IsBerkeleyBtree(const fs::path &path) { | ||||
if (!fs::exists(path)) { | |||||
return false; | |||||
} | |||||
// A Berkeley DB Btree file has at least 4K. | // A Berkeley DB Btree file has at least 4K. | ||||
// This check also prevents opening lock files. | // This check also prevents opening lock files. | ||||
boost::system::error_code ec; | boost::system::error_code ec; | ||||
auto size = fs::file_size(path, ec); | auto size = fs::file_size(path, ec); | ||||
if (ec) { | if (ec) { | ||||
LogPrintf("%s: %s %s\n", __func__, ec.message(), path.string()); | LogPrintf("%s: %s %s\n", __func__, ec.message(), path.string()); | ||||
} | } | ||||
if (size < 4096) { | if (size < 4096) { | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |