From 932348367e6508d027e4d247d6736b15fab4b619 Mon Sep 17 00:00:00 2001 From: mpl Date: Mon, 15 Jun 2015 17:32:56 +0200 Subject: [PATCH] pkg/index: bugfix; get mediatags by wholeRef when no corpus Not that it matters, hardly anything works without the corpus anyway. Change-Id: I94b3f01073766f6c68ac615757cd401bc68ec506 --- pkg/index/index.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/index/index.go b/pkg/index/index.go index f7db13f0b..420ef5eda 100644 --- a/pkg/index/index.go +++ b/pkg/index/index.go @@ -1231,7 +1231,11 @@ func (x *Index) GetMediaTags(fileRef blob.Ref) (tags map[string]string, err erro if x.corpus != nil { return x.corpus.GetMediaTags(fileRef) } - it := x.queryPrefix(keyMediaTag, fileRef.String()) + fi, err := x.GetFileInfo(fileRef) + if err != nil { + return nil, err + } + it := x.queryPrefix(keyMediaTag, fi.WholeRef.String()) defer closeIterator(it, &err) for it.Next() { tags[it.Key()] = it.Value()