diff --git a/pkg/fs/recent.go b/pkg/fs/recent.go index 4f0c3d1b2..36c4d1266 100644 --- a/pkg/fs/recent.go +++ b/pkg/fs/recent.go @@ -21,7 +21,8 @@ package fs import ( "log" "os" - "path" + "path/filepath" + "strings" "sync" "time" @@ -109,7 +110,11 @@ func (n *recentDir) ReadDir(intr fs.Intr) ([]fuse.Dirent, fuse.Error) { continue } if name == "" || n.ents[name] != nil { - name = ccMeta.BlobRef.String() + path.Ext(name) + ext := filepath.Ext(name) + if ext == "" && strings.HasSuffix(ccMeta.File.MIMEType, "image/jpeg") { + ext = ".jpg" + } + name = strings.TrimPrefix(ccMeta.BlobRef.String(), "sha1-")[:10] + ext if n.ents[name] != nil { continue }