Skip to content

Commit

Permalink
Create bbolt directories
Browse files Browse the repository at this point in the history
  • Loading branch information
wraymo committed Apr 26, 2022
1 parent cf40d49 commit a6bb0a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ func (s *Store) Start(enableBootstrap bool) error {
s.snapshotStore = snapshots
s.stableStore = inMemStore
} else {
if err := os.MkdirAll(s.dataDir, 0755); err != nil && !os.IsExist(err) {
return fmt.Errorf("data directory is not accessible: %v", err)
}
dbPath := filepath.Join(s.dataDir, raftDBName)
boltDB, err := boltstore.NewBoltStore(dbPath, retainSnapshotCount)
if err != nil {
Expand Down

0 comments on commit a6bb0a4

Please sign in to comment.