mirror of
https://github.com/cloudreve/Cloudreve.git
synced 2026-11-26 07:24:47 +00:00
Fix: unclosed file after get thumbnails
This commit is contained in:
1 parent
ee08821361
commit
bf0998f3a5
2 files changed
+2
-4
No files matched your search
@@ -69,10 +69,7 @@ func (handler Handler) Put(ctx context.Context, file io.ReadCloser, dst string,
|
||||
util.Log().Warning("无法创建文件,%s", err)
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
err := out.Close()
|
||||
fmt.Print(err)
|
||||
}()
|
||||
defer out.Close()
|
||||
|
||||
// 写入文件内容
|
||||
_, err = io.Copy(out, file)
|
||||
|
||||
Reference in new issue
Block a user