diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-09-04 09:18:46 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-09-08 20:54:14 +0000 |
commit | 97764bae3a3caaeeb4d96a063d1cc0ff1b3489c1 (patch) | |
tree | db0157cd7eede91ed891858e2aa51bb9ebf46e44 /src | |
parent | Merge pull request #4223 (diff) | |
download | monero-97764bae3a3caaeeb4d96a063d1cc0ff1b3489c1.tar.xz |
wallet_rpc_server: error out if wallet-file and wallet-dir are both used
Diffstat (limited to 'src')
-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 2cddea25d..45bc0a1f3 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -179,8 +179,13 @@ namespace tools } } 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) |