From b7d040a4ec9f5ac432d94d48b553c2c0a4040e4e Mon Sep 17 00:00:00 2001 From: Andrey Smorodov Date: Sun, 30 Oct 2016 21:09:55 +0300 Subject: [PATCH] Fixed creating DB folder in windows. DB folder was not created, while opening DB in windows. --- lmdb++.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lmdb++.h b/lmdb++.h index ab75f8c..a1a0361 100644 --- a/lmdb++.h +++ b/lmdb++.h @@ -1194,6 +1194,9 @@ class lmdb::env { env& open(const char* const path, const unsigned int flags = default_flags, const mode mode = default_mode) { +#if defined(_WIN32) + CreateDirectory(path, NULL); +#endif lmdb::env_open(handle(), path, flags, mode); return *this; }