Skip to content

Commit

Permalink
pkg/transport: use TouchDirAll
Browse files Browse the repository at this point in the history
  • Loading branch information
gyuho committed Jun 22, 2016
1 parent 6cfc03a commit 4a0f922
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/transport/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"strings"
"time"

"github.com/coreos/etcd/pkg/fileutil"
"github.com/coreos/etcd/pkg/tlsutil"
)

Expand Down Expand Up @@ -101,7 +102,7 @@ func (info TLSInfo) Empty() bool {
}

func SelfCert(dirpath string, hosts []string) (info TLSInfo, err error) {
if err = os.MkdirAll(dirpath, 0700); err != nil {
if err = fileutil.TouchDirAll(dirpath); err != nil {
return
}

Expand Down

0 comments on commit 4a0f922

Please sign in to comment.