mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
fix: close file in LocalFileSystemProvider's Put() (#2882)
This commit is contained in:
parent
66d0758b13
commit
f7fb32893b
@ -70,6 +70,7 @@ func (sp LocalFileSystemProvider) Put(path string, reader io.Reader) (*oss.Objec
|
||||
|
||||
dst, err := os.Create(filepath.Clean(fullPath))
|
||||
if err == nil {
|
||||
defer dst.Close()
|
||||
if seeker, ok := reader.(io.ReadSeeker); ok {
|
||||
seeker.Seek(0, 0)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user