1
0
Fork 0
forked from lthn/blockchain

made lmdb_db_backend::open() able to create required dir tree

This commit is contained in:
sowle 2019-08-10 05:31:47 +03:00
parent ad7bffbd0e
commit 1df90ca65d
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -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);