diff --git a/repository/index.go b/repository/index.go index 979401a91..b89d8f25e 100644 --- a/repository/index.go +++ b/repository/index.go @@ -64,8 +64,8 @@ const ( indexMaxAge = 15 * time.Minute ) -// Full returns true iff the index is "full enough" to be saved as a preliminary index. -func (idx *Index) Full() bool { +// IndexFull returns true iff the index is "full enough" to be saved as a preliminary index. +var IndexFull = func(idx *Index) bool { idx.m.Lock() defer idx.m.Unlock() diff --git a/repository/master_index.go b/repository/master_index.go index c6efc20e4..4d52789af 100644 --- a/repository/master_index.go +++ b/repository/master_index.go @@ -206,7 +206,7 @@ func (mi *MasterIndex) FullIndexes() []*Index { continue } - if idx.Full() { + if IndexFull(idx) { debug.Log("MasterIndex.FullIndexes", "index %p is full", idx) list = append(list, idx) } else {