Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletutil.cpp
Show All 10 Lines | if (gArgs.IsArgSet("-walletdir")) { | ||||
path = fs::system_complete(gArgs.GetArg("-walletdir", "")); | path = fs::system_complete(gArgs.GetArg("-walletdir", "")); | ||||
if (!fs::is_directory(path)) { | if (!fs::is_directory(path)) { | ||||
// If the path specified doesn't exist, we return the deliberately | // If the path specified doesn't exist, we return the deliberately | ||||
// invalid empty string. | // invalid empty string. | ||||
path = ""; | path = ""; | ||||
} | } | ||||
} else { | } else { | ||||
path = GetDataDir(); | path = GetDataDir(); | ||||
// If a wallets directory exists, use that, otherwise default to | |||||
// GetDataDir | |||||
if (fs::is_directory(path / "wallets")) { | |||||
path /= "wallets"; | |||||
} | |||||
} | } | ||||
return path; | return path; | ||||
} | } |