From 813c1d38e74b038bb7bc75310babf6b7f206549f Mon Sep 17 00:00:00 2001 From: Scott Date: Wed, 26 Feb 2020 10:53:22 +1030 Subject: [PATCH] container/mts/meta: make Delete method correctly update order field --- container/mts/meta/meta.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/mts/meta/meta.go b/container/mts/meta/meta.go index d3c6a8a9..4b2f8c9f 100644 --- a/container/mts/meta/meta.go +++ b/container/mts/meta/meta.go @@ -142,7 +142,7 @@ func (m *Data) Delete(key string) { delete(m.data, key) for i, k := range m.order { if k == key { - copy(m.order[:i], m.order[i+1:]) + copy(m.order[i:], m.order[i+1:]) m.order = m.order[:len(m.order)-1] break }