From 70b95135e6681d0a19b98acf426df48b54d91e8e Mon Sep 17 00:00:00 2001 From: Zach Ramsay Date: Mon, 18 Sep 2017 17:49:43 -0400 Subject: [PATCH] consensus: use filepath for windows compatibility, closes #595 --- consensus/state.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consensus/state.go b/consensus/state.go index f6ee5d45..2523aac6 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -4,7 +4,7 @@ import ( "bytes" "errors" "fmt" - "path" + "path/filepath" "reflect" "sync" "time" @@ -394,7 +394,7 @@ func (cs *ConsensusState) Wait() { // OpenWAL opens a file to log all consensus messages and timeouts for deterministic accountability func (cs *ConsensusState) OpenWAL(walFile string) (err error) { - err = cmn.EnsureDir(path.Dir(walFile), 0700) + err = cmn.EnsureDir(filepath.Dir(walFile), 0700) if err != nil { cs.Logger.Error("Error ensuring ConsensusState wal dir", "err", err.Error()) return err