[#727] Use util.MkdirAllX
instead of os.MkdirAll
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
51eeae3640
commit
7a10d902be
6 changed files with 21 additions and 20 deletions
|
@ -4,9 +4,9 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util"
|
||||
locodedb "github.com/nspcc-dev/neofs-node/pkg/util/locode/db"
|
||||
"go.etcd.io/bbolt"
|
||||
)
|
||||
|
@ -20,7 +20,7 @@ func (db *DB) Open() error {
|
|||
// copy-paste from metabase:
|
||||
// consider universal Open/Close for BoltDB wrappers
|
||||
|
||||
err := os.MkdirAll(path.Dir(db.path), db.mode)
|
||||
err := util.MkdirAllX(path.Dir(db.path), db.mode)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not create dir for BoltDB: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue