diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-09-14 13:06:22 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-09-14 13:06:22 +0200 |
commit | 7850541074f6e6ed51db6dde59e60274a25e6543 (patch) | |
tree | 25922e1b87d09ed9e2786eafd6de4af5c75050a5 /src/wallet/wallet_rpc_server.cpp | |
parent | Merge pull request #4336 (diff) | |
parent | wallet_rpc_server: error out if wallet-file and wallet-dir are both used (diff) | |
download | monero-7850541074f6e6ed51db6dde59e60274a25e6543.tar.xz |
Merge pull request #4337
97764bae wallet_rpc_server: error out if wallet-file and wallet-dir are both used (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 0e0b2e4eb..ee86587bc 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -160,8 +160,13 @@ namespace tools std::string bind_port = command_line::get_arg(*m_vm, arg_rpc_bind_port); const bool disable_auth = command_line::get_arg(*m_vm, arg_disable_rpc_login); m_restricted = command_line::get_arg(*m_vm, arg_restricted); - if (command_line::has_arg(*m_vm, arg_wallet_dir)) + if (!command_line::is_arg_defaulted(*m_vm, arg_wallet_dir)) { + if (!command_line::is_arg_defaulted(*m_vm, wallet_args::arg_wallet_file())) + { + MERROR(arg_wallet_dir.name << " and " << wallet_args::arg_wallet_file().name << " are incompatible, use only one of them"); + return false; + } m_wallet_dir = command_line::get_arg(*m_vm, arg_wallet_dir); #ifdef _WIN32 #define MKDIR(path, mode) mkdir(path) |