mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2024-06-02 06:26:06 +02:00
certificate.Store: Don't call os.MkdirAll
This commit is contained in:
parent
504da9afd8
commit
be3d09d7f4
|
@ -6,7 +6,6 @@ import (
|
||||||
"crypto/x509/pkix"
|
"crypto/x509/pkix"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
@ -83,10 +82,6 @@ func (s *Store) write(scope string, cert tls.Certificate) error {
|
||||||
if s.path != "" {
|
if s.path != "" {
|
||||||
certPath := filepath.Join(s.path, scope+".crt")
|
certPath := filepath.Join(s.path, scope+".crt")
|
||||||
keyPath := filepath.Join(s.path, scope+".key")
|
keyPath := filepath.Join(s.path, scope+".key")
|
||||||
|
|
||||||
dir := filepath.Dir(certPath)
|
|
||||||
os.MkdirAll(dir, 0755)
|
|
||||||
|
|
||||||
if err := Write(cert, certPath, keyPath); err != nil {
|
if err := Write(cert, certPath, keyPath); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue