aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichał Sałaban <michal@salaban.info>2017-10-07 02:04:33 +0200
committerMichał Sałaban <michal@salaban.info>2017-10-07 02:04:33 +0200
commit2183ade0c4e9cd7e923d325a97ff3ddfdc9fc941 (patch)
treedddc82b32ca1bcf8b059d740e73b89d263c73497 /src
parentMerge pull request #2548 (diff)
downloadmonero-2183ade0c4e9cd7e923d325a97ff3ddfdc9fc941.tar.xz
Don't try to create wallet-dir when it's not given, don't crash if wallet-dir already exists.
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet_rpc_server.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 46b092376..195de0c89 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -154,7 +154,7 @@ namespace tools
#else
#define MKDIR(path, mode) mkdir(path, mode)
#endif
- if (MKDIR(m_wallet_dir.c_str(), 0700) < 0)
+ if (!m_wallet_dir.empty() && MKDIR(m_wallet_dir.c_str(), 0700) < 0 && errno != EEXIST)
{
#ifdef _WIN32
LOG_ERROR(tr("Failed to create directory ") + m_wallet_dir);