s3store: Properly remove temporary files (#299)

This commit is contained in:
Sergio Contreras Castañeda 2019-08-12 04:05:49 -07:00 committed by Marius
parent 4a0313550d
commit 31d31ba3b9
1 changed files with 1 additions and 1 deletions

View File

@ -259,8 +259,8 @@ func (store S3Store) WriteChunk(id string, offset int64, src io.Reader) (int64,
return 0, err
}
if incompletePartFile != nil {
defer incompletePartFile.Close()
defer os.Remove(incompletePartFile.Name())
defer incompletePartFile.Close()
if err := store.deleteIncompletePartForUpload(uploadId); err != nil {
return 0, err