Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request goraft#204 from xiangli-cmu/init
Browse files Browse the repository at this point in the history
fix(server.Init) fix snapshot mkdir error handling
  • Loading branch information
benbjohnson committed Mar 23, 2014
2 parents b9272d0 + 30ecfdb commit 6bf34b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ func (s *server) Init() error {

// Create snapshot directory if it does not exist
err := os.Mkdir(path.Join(s.path, "snapshot"), 0700)
if err != nil && os.IsNotExist(err) {
if err != nil && !os.IsExist(err) {
s.debugln("raft: Snapshot dir error: ", err)
return fmt.Errorf("raft: Initialization error: %s", err)
}
Expand Down

0 comments on commit 6bf34b9

Please sign in to comment.