diff --git a/drivers/alias/util.go b/drivers/alias/util.go index f86ed5557be..e694969021d 100644 --- a/drivers/alias/util.go +++ b/drivers/alias/util.go @@ -72,11 +72,21 @@ func (d *Alias) list(ctx context.Context, dst, sub string) ([]model.Obj, error) return nil, err } return utils.SliceConvert(objs, func(obj model.Obj) (model.Obj, error) { - return &model.Object{ + thumb, ok := model.GetThumb(obj) + objRes := model.Object{ Name: obj.GetName(), Size: obj.GetSize(), Modified: obj.ModTime(), IsFolder: obj.IsDir(), + } + if !ok { + return &objRes, nil + } + return &model.ObjThumb{ + Object: objRes, + Thumbnail: model.Thumbnail{ + Thumbnail: thumb, + }, }, nil }) }