drycpp / lmdbxx

C++11 wrapper for the LMDB embedded B+ tree database library.
http://lmdbxx.sourceforge.net
The Unlicense
270 stars 89 forks source link

Update lmdb++.h #17

Open Smorodov opened 7 years ago

Smorodov commented 7 years ago

DB folder was not created, while opening DB in windows. env.open(DB_name.c_str()); in example program exited after this line with code 3.

davidalbertonogueira commented 5 years ago

I fixed it with:

env& open(const char* const path, const unsigned int flags = default_flags) {
  if (!(flags & MDB_NOSUBDIR))
    fs::create_directory(path);
  lmdb::env_open(handle(), path, flags, default_mode);
  return *this;
}