forked from lthn/blockchain
made lmdb_db_backend::open() able to create required dir tree
This commit is contained in:
parent
ad7bffbd0e
commit
1df90ca65d
1 changed files with 3 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include "misc_language.h"
|
||||
#include "string_coding.h"
|
||||
#include "profile_tools.h"
|
||||
#include "util.h"
|
||||
|
||||
#define BUF_SIZE 1024
|
||||
|
||||
|
|
@ -52,6 +53,8 @@ namespace tools
|
|||
m_path = epee::string_encoding::convert_ansii_to_utf8(m_path);
|
||||
#endif
|
||||
|
||||
CHECK_AND_ASSERT_MES(tools::create_directories_if_necessary(m_path), false, "create_directories_if_necessary failed: " << m_path);
|
||||
|
||||
res = mdb_env_open(m_penv, m_path.c_str(), MDB_NORDAHEAD , 0644);
|
||||
CHECK_AND_ASSERT_MESS_LMDB_DB(res, false, "Unable to mdb_env_open, m_path=" << m_path);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue