Don't try to create wallet-dir when it's not given, don't crash if wallet-dir already exists.
This commit is contained in:
parent
86e9de588c
commit
2183ade0c4
|
@ -154,7 +154,7 @@ namespace tools
|
||||||
#else
|
#else
|
||||||
#define MKDIR(path, mode) mkdir(path, mode)
|
#define MKDIR(path, mode) mkdir(path, mode)
|
||||||
#endif
|
#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
|
#ifdef _WIN32
|
||||||
LOG_ERROR(tr("Failed to create directory ") + m_wallet_dir);
|
LOG_ERROR(tr("Failed to create directory ") + m_wallet_dir);
|
||||||
|
|
Loading…
Reference in New Issue