fix: close file

This commit is contained in:
krau
2025-02-01 16:00:56 +08:00
parent cf1e9299c0
commit 804a86cbdd

View File

@@ -108,6 +108,7 @@ func (a *Alist) Save(ctx context.Context, filePath, storagePath string) error {
if err != nil {
return err
}
defer file.Close()
fileBytes, err := io.ReadAll(file)
if err != nil {
return err