Commit ad51d8e5 authored by Matthieu Dorier's avatar Matthieu Dorier

corrected exists() function in BDB backend

parent 7cfe6965
......@@ -221,7 +221,7 @@ bool BerkeleyDBDataStore::exists(const void* key, size_t size) const {
Dbt db_key((void*)key, size);
db_key.set_flags(DB_DBT_USERMEM);
int status = _dbm->exists(NULL, &db_key, 0);
return status == 0;
return status != DB_NOTFOUND;
}
bool BerkeleyDBDataStore::erase(const ds_bulk_t &key) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment