mirror of https://github.com/perkeep/perkeep.git
test: fix enumerate bug in in-memory storage when double-uploaded
Change-Id: I7e6abb1c9dfc61f39fa9d315857bf7aeb13b6b59
This commit is contained in:
parent
cf22032792
commit
31125295a4
|
@ -56,9 +56,12 @@ func (tf *Fetcher) AddBlob(b *Blob) {
|
|||
tf.m = make(map[string]*Blob)
|
||||
}
|
||||
key := b.BlobRef().String()
|
||||
_, had := tf.m[key]
|
||||
tf.m[key] = b
|
||||
if !had {
|
||||
tf.sorted = append(tf.sorted, key)
|
||||
sort.Strings(tf.sorted)
|
||||
}
|
||||
}
|
||||
|
||||
func (tf *Fetcher) FetchStreaming(ref blob.Ref) (file io.ReadCloser, size int64, err error) {
|
||||
|
|
Loading…
Reference in New Issue