mirror of
https://github.com/minio/minio.git
synced 2025-01-12 23:43:22 -05:00
parent
989d7af9ac
commit
7c2ae4eaf7
@ -713,6 +713,11 @@ func (fs *FSObjects) AbortMultipartUpload(ctx context.Context, bucket, object, u
|
|||||||
}
|
}
|
||||||
|
|
||||||
fs.appendFileMapMu.Lock()
|
fs.appendFileMapMu.Lock()
|
||||||
|
// Remove file in tmp folder
|
||||||
|
file := fs.appendFileMap[uploadID]
|
||||||
|
if file != nil {
|
||||||
|
fsRemoveFile(ctx, file.filePath)
|
||||||
|
}
|
||||||
delete(fs.appendFileMap, uploadID)
|
delete(fs.appendFileMap, uploadID)
|
||||||
fs.appendFileMapMu.Unlock()
|
fs.appendFileMapMu.Unlock()
|
||||||
|
|
||||||
@ -725,10 +730,14 @@ func (fs *FSObjects) AbortMultipartUpload(ctx context.Context, bucket, object, u
|
|||||||
}
|
}
|
||||||
return toObjectErr(err, bucket, object)
|
return toObjectErr(err, bucket, object)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore the error returned as Windows fails to remove directory if a file in it
|
// Ignore the error returned as Windows fails to remove directory if a file in it
|
||||||
// is Open()ed by the backgroundAppend()
|
// is Open()ed by the backgroundAppend()
|
||||||
fsRemoveAll(ctx, uploadIDDir)
|
fsRemoveAll(ctx, uploadIDDir)
|
||||||
|
|
||||||
|
// It is safe to ignore any directory not empty error (in case there were multiple uploadIDs on the same object)
|
||||||
|
fsRemoveDir(ctx, fs.getMultipartSHADir(bucket, object))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user