Skip to content

Conversation

Smorodov
Copy link

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.

DB folder was not created, while opening DB in msvc2015 in windows.
@davidalbertonogueira
Copy link

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants