Fix: unclosed file after get thumbnails

This commit is contained in:
HFO4
2020-01-01 20:17:50 +08:00
parent ee08821361
commit bf0998f3a5
2 changed files with 2 additions and 4 deletions

View File

@@ -52,6 +52,7 @@ func (fs *FileSystem) GenerateThumbnail(ctx context.Context, file *model.File) {
if err != nil {
return
}
defer source.Close()
image, err := thumb.NewThumbFromFile(source, file.Name)
if err != nil {