Fix: failed to get thumbnails under global OneDrive policy

This commit is contained in:
HFO4
2021-03-14 11:03:10 +08:00
parent d1377262e3
commit 170f2279c1
4 changed files with 7 additions and 17 deletions

View File

@@ -39,8 +39,8 @@ func (fs *FileSystem) GetThumb(ctx context.Context, id uint) (*response.ContentR
res.MaxAge = model.GetIntSetting("preview_timeout", 60)
}
// 出错时重新生成缩略图
if err != nil {
// 本地存储策略出错时重新生成缩略图
if err != nil && fs.Policy.Type == "local" {
fs.GenerateThumbnail(ctx, &fs.FileTarget[0])
}