acmetool: fix patch: panic when uuid.NewV4() fails
This commit is contained in:
parent
91ddbde10d
commit
619ea38c17
@ -1,12 +1,11 @@
|
||||
--- storage/types.go.orig 2018-01-11 08:57:49.339089353 +0100
|
||||
+++ storage/types.go 2018-01-11 08:58:12.707027749 +0100
|
||||
@@ -194,7 +194,8 @@ func (tgt *Target) ensureFilename() {
|
||||
@@ -194,7 +194,7 @@ func (tgt *Target) ensureFilename() {
|
||||
nprefix = tgt.Satisfy.Names[0] + "-"
|
||||
}
|
||||
|
||||
- b := uuid.NewV4().Bytes()
|
||||
+ u, _ := uuid.NewV4()
|
||||
+ b := u.Bytes()
|
||||
+ b := uuid.Must(uuid.NewV4()).Bytes()
|
||||
str := strings.ToLower(strings.TrimRight(base32.StdEncoding.EncodeToString(b), "="))
|
||||
|
||||
tgt.Filename = nprefix + str
|
||||
|
Loading…
x
Reference in New Issue
Block a user