From eac4dee56ddf0307950278b23b12465744ce9164 Mon Sep 17 00:00:00 2001 From: Marty Schoch Date: Fri, 16 May 2014 10:08:23 -0400 Subject: [PATCH] fix bug in Get impl of ForestDB store --- index/store/goforestdb/store.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index/store/goforestdb/store.go b/index/store/goforestdb/store.go index ca36ae2f..fe502b45 100644 --- a/index/store/goforestdb/store.go +++ b/index/store/goforestdb/store.go @@ -27,7 +27,11 @@ func Open(path string) (*ForestDBStore, error) { } func (f *ForestDBStore) Get(key []byte) ([]byte, error) { - return f.db.GetKV(key) + res, err := f.db.GetKV(key) + if err != nil && err != forestdb.RESULT_KEY_NOT_FOUND { + return nil, err + } + return res, nil } func (f *ForestDBStore) Set(key, val []byte) error {