Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lmdb++.h #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update lmdb++.h #17

wants to merge 1 commit into from

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