pkg/transport: use TouchDirAll
parent
6cfc03a5f9
commit
4a0f922a6c
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue