[#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

@ -2,16 +2,16 @@ package meta
import (
"fmt"
"os"
"path"
"github.com/nspcc-dev/neofs-node/pkg/util"
"go.etcd.io/bbolt"
"go.uber.org/zap"
)
// Open boltDB instance for metabase.
func (db *DB) Open() error {
err := os.MkdirAll(path.Dir(db.info.Path), db.info.Permission)
err := util.MkdirAllX(path.Dir(db.info.Path), db.info.Permission)
if err != nil {
return fmt.Errorf("can't create dir %s for metabase: %w", db.info.Path, err)
}