Fix ReadDir for recent in cammount

Change-Id: I422393ec77034b8408094b663b34121a499ad4a7
This commit is contained in:
Matthieu Rakotojaona 2014-10-23 23:29:55 +02:00
parent e14c122c52
commit af0d711c01
1 changed files with 1 additions and 1 deletions

View File

@ -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