forked from TrueCloudLab/frostfs-s3-gw
[#451] Handle lock objects using tree service
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
bc000f1bc4
commit
dd534e8738
23 changed files with 488 additions and 520 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/xml"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/nspcc-dev/neofs-s3-gw/api"
|
||||
"github.com/nspcc-dev/neofs-s3-gw/api/data"
|
||||
|
@ -144,7 +145,7 @@ func (h *handler) DeleteObjectHandler(w http.ResponseWriter, r *http.Request) {
|
|||
func isErrObjectLocked(err error) bool {
|
||||
switch err.(type) {
|
||||
default:
|
||||
return false
|
||||
return strings.Contains(err.Error(), "object is locked")
|
||||
case apistatus.ObjectLocked,
|
||||
*apistatus.ObjectLocked:
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue