diff options
Diffstat (limited to 'src/hub/src/spreadspace.org/sfive/s5store.go')
-rw-r--r-- | src/hub/src/spreadspace.org/sfive/s5store.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5store.go b/src/hub/src/spreadspace.org/sfive/s5store.go index f097e8e..426b46d 100644 --- a/src/hub/src/spreadspace.org/sfive/s5store.go +++ b/src/hub/src/spreadspace.org/sfive/s5store.go @@ -425,10 +425,14 @@ func (st Store) GetUpdatesAfter(id, limit int) (res []DataUpdateFull, err error) } err = st.db.View(func(tx *bolt.Tx) error { c := tx.Bucket([]byte(dataUpdatesBn)).Cursor() - if k, _ := c.Seek(itob(id)); k == nil { + k, v := c.Seek(itob(id)) + if k == nil { return nil } - for k, v := c.Next(); k != nil; k, v = c.Next() { + if btoi(k) == id { + k, v = c.Next() + } + for ; k != nil; k, v = c.Next() { var d dataUpdateDb if err := json.Unmarshal(v, &d); err != nil { return err |