Skip to content

Commit

Permalink
Merge pull request #404 from spacemeshos/recursively-create-datadir
Browse files Browse the repository at this point in the history
Create datadir recursively
  • Loading branch information
poszu committed Sep 20, 2023
2 parents 7cbb631 + 1e4c7d0 commit 9314b3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func New(ctx context.Context, cfg Config) (*Server, error) {
}

if _, err := os.Stat(cfg.DataDir); os.IsNotExist(err) {
if err := os.Mkdir(cfg.DataDir, 0o700); err != nil {
if err := os.MkdirAll(cfg.DataDir, 0o700); err != nil {
return nil, err
}
}
Expand Down

0 comments on commit 9314b3c

Please sign in to comment.