14 if (!fs::is_directory(path)) {
22 if (fs::is_directory(path /
"wallets")) {
38 fs::path wallet_path = fs::absolute(walletFile,
GetWalletDir());
39 fs::file_type path_type = fs::symlink_status(wallet_path).type();
40 if (!(path_type == fs::file_not_found || path_type == fs::directory_file ||
41 (path_type == fs::symlink_file && fs::is_directory(wallet_path)) ||
42 (path_type == fs::regular_file && fs::path(walletFile).filename() == walletFile))) {
44 _(
"Invalid -wallet path '%s'. -wallet path should point to a directory where wallet.dat and "
45 "database/log.?????????? files can be stored, a location where such a directory could be created "
46 "or (for backwards compatibility) the name of an existing data file in -walletdir (%s)"),
bool IsArgSet(const std::string &strArg) const
Return true if the given argument has been manually set.
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
const fs::path & GetDataDir(bool fNetSpecific)
std::string _(const char *psz)
Translation function: Call Translate signal on UI interface, which returns a Optional result.
fs::path GetWalletDir()
Get the path of the wallet directory.
OperationResult VerifyWalletPath(const std::string &walletFile)
Verify the wallet db's path.