Skip to content

Commit

Permalink
Change Mkdir to MkdirAll (#1497)
Browse files Browse the repository at this point in the history
In case not all parents directories exist.
  • Loading branch information
efiguti authored Sep 3, 2020
1 parent 806a325 commit d57a3ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db.go
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@ func createDirs(opt Options) error {
return errors.Errorf("Cannot find directory %q for read-only open", path)
}
// Try to create the directory
err = os.Mkdir(path, 0700)
err = os.MkdirAll(path, 0700)
if err != nil {
return y.Wrapf(err, "Error Creating Dir: %q", path)
}
Expand Down

0 comments on commit d57a3ca

Please sign in to comment.