From af0d711c01ab07760b2908c9182485b88a4b6ac5 Mon Sep 17 00:00:00 2001 From: Matthieu Rakotojaona Date: Thu, 23 Oct 2014 23:29:55 +0200 Subject: [PATCH] Fix ReadDir for recent in cammount Change-Id: I422393ec77034b8408094b663b34121a499ad4a7 --- pkg/fs/recent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/fs/recent.go b/pkg/fs/recent.go index 36c4d1266..ba9149d70 100644 --- a/pkg/fs/recent.go +++ b/pkg/fs/recent.go @@ -111,7 +111,7 @@ func (n *recentDir) ReadDir(intr fs.Intr) ([]fuse.Dirent, fuse.Error) { } if name == "" || n.ents[name] != nil { ext := filepath.Ext(name) - if ext == "" && strings.HasSuffix(ccMeta.File.MIMEType, "image/jpeg") { + if ext == "" && ccMeta.File != nil && strings.HasSuffix(ccMeta.File.MIMEType, "image/jpeg") { ext = ".jpg" } name = strings.TrimPrefix(ccMeta.BlobRef.String(), "sha1-")[:10] + ext