mirror of
https://github.com/minio/minio.git
synced 2025-12-08 00:32:28 -05:00
add force delete option of non-empty bucket (#9166)
passing HTTP header `x-minio-force-delete: true` would allow standard S3 API DeleteBucket to delete a non-empty bucket forcefully.
This commit is contained in:
@@ -107,11 +107,11 @@ func (p *posixDiskIDCheck) StatVol(volume string) (vol VolInfo, err error) {
|
||||
return p.storage.StatVol(volume)
|
||||
}
|
||||
|
||||
func (p *posixDiskIDCheck) DeleteVol(volume string) (err error) {
|
||||
func (p *posixDiskIDCheck) DeleteVol(volume string, forceDelete bool) (err error) {
|
||||
if p.isDiskStale() {
|
||||
return errDiskNotFound
|
||||
}
|
||||
return p.storage.DeleteVol(volume)
|
||||
return p.storage.DeleteVol(volume, forceDelete)
|
||||
}
|
||||
|
||||
func (p *posixDiskIDCheck) Walk(volume, dirPath string, marker string, recursive bool, leafFile string, readMetadataFn readMetadataFunc, endWalkCh <-chan struct{}) (chan FileInfo, error) {
|
||||
|
||||
Reference in New Issue
Block a user