[#727] Use util.MkdirAllX instead of os.MkdirAll

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-07-28 19:19:33 +03:00 committed by Alex Vanin
parent 51eeae3640
commit 7a10d902be
6 changed files with 21 additions and 20 deletions

View file

@ -10,6 +10,7 @@ import (
cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id"
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
"github.com/nspcc-dev/neofs-node/pkg/util"
)
// FSTree represents object storage as filesystem tree.
@ -157,7 +158,7 @@ func (t *FSTree) Exists(addr *objectSDK.Address) (string, error) {
func (t *FSTree) Put(addr *objectSDK.Address, data []byte) error {
p := t.treePath(addr)
if err := os.MkdirAll(path.Dir(p), t.Permissions); err != nil {
if err := util.MkdirAllX(path.Dir(p), t.Permissions); err != nil {
return err
}