CoreyKaylor / Lightning.NET

.NET library for LMDB key-value store
Other
398 stars 82 forks source link

Incorrect behavior of method LightningEnvironment.Open #78

Closed ilyalatt closed 7 years ago

ilyalatt commented 7 years ago

LightningEnvironment.Open incorrectly handle case when argument openFlags contains EnvironmentOpenFlags.NoSubDir.

MDB_NOSUBDIR By default, LMDB creates its environment in a directory whose pathname is given in path, and creates its data and lock files under that directory. With this option, path is used as-is for the database main data file. The database lock file is the path with "-lock" appended.

DanielAdolfsson commented 7 years ago

Yeah this is breaking things for me. Need me to submit a patch? It's one line of code to check for the flag.

CoreyKaylor commented 7 years ago

A pull request would certainly speed up the fix, yes.

CoreyKaylor commented 7 years ago

Thanks for the PR!