Skip to content

Commit 9430b58

Browse files
author
Qingping Hou
committed
fix: close file descriptor after download rename
1 parent 937ad8d commit 9430b58

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/sync/pull.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ func (self *Puller) downloadHandler(task DownloadTask, downloader GenericDownloa
104104
self.errMsgQueue <- fmt.Sprintf("Failed to create file %s for download: %v", tmpfile.Name(), err)
105105
return
106106
}
107+
defer tmpfile.Close()
107108

108109
downloader.Download(tmpfile, &s3.GetObjectInput{
109110
Bucket: aws.String(bucket),

0 commit comments

Comments
 (0)