Explorar o código

pkg/transport: use TouchDirAll

Gyu-Ho Lee %!s(int64=9) %!d(string=hai) anos
pai
achega
4a0f922a6c
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      pkg/transport/listener.go

+ 2 - 1
pkg/transport/listener.go

@@ -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
 	}