mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -05:00
parent
2af3004409
commit
8befedef14
@ -731,9 +731,18 @@ func (fs *FSObjects) CompleteMultipartUpload(ctx context.Context, bucket string,
|
|||||||
logger.LogIf(ctx, err)
|
logger.LogIf(ctx, err)
|
||||||
return oi, toObjectErr(err, bucket, object)
|
return oi, toObjectErr(err, bucket, object)
|
||||||
}
|
}
|
||||||
fsRemoveAll(ctx, uploadIDDir)
|
|
||||||
// It is safe to ignore any directory not empty error (in case there were multiple uploadIDs on the same object)
|
// Purge multipart folders
|
||||||
fsRemoveDir(ctx, fs.getMultipartSHADir(bucket, object))
|
{
|
||||||
|
fsTmpObjPath := pathJoin(fs.fsPath, minioMetaTmpBucket, fs.fsUUID, mustGetUUID())
|
||||||
|
defer fsRemoveAll(ctx, fsTmpObjPath) // remove multipart temporary files in background.
|
||||||
|
|
||||||
|
fsSimpleRenameFile(ctx, uploadIDDir, fsTmpObjPath)
|
||||||
|
|
||||||
|
// 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))
|
||||||
|
}
|
||||||
|
|
||||||
fi, err := fsStatFile(ctx, pathJoin(fs.fsPath, bucket, object))
|
fi, err := fsStatFile(ctx, pathJoin(fs.fsPath, bucket, object))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return oi, toObjectErr(err, bucket, object)
|
return oi, toObjectErr(err, bucket, object)
|
||||||
@ -782,12 +791,16 @@ 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
|
// Purge multipart folders
|
||||||
// is Open()ed by the backgroundAppend()
|
{
|
||||||
fsRemoveAll(ctx, uploadIDDir)
|
fsTmpObjPath := pathJoin(fs.fsPath, minioMetaTmpBucket, fs.fsUUID, mustGetUUID())
|
||||||
|
defer fsRemoveAll(ctx, fsTmpObjPath) // remove multipart temporary files in background.
|
||||||
|
|
||||||
// It is safe to ignore any directory not empty error (in case there were multiple uploadIDs on the same object)
|
fsSimpleRenameFile(ctx, uploadIDDir, fsTmpObjPath)
|
||||||
fsRemoveDir(ctx, fs.getMultipartSHADir(bucket, object))
|
|
||||||
|
// 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