pkg/transport: use TouchDirAll

release-3.0
Gyu-Ho Lee 2016-06-22 15:09:47 -07:00
parent 6cfc03a5f9
commit 4a0f922a6c
1 changed files with 2 additions and 1 deletions

View File

@ -31,6 +31,7 @@ import (
"strings"
"time"
"github.com/coreos/etcd/pkg/fileutil"
"github.com/coreos/etcd/pkg/tlsutil"
)
@ -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
}