소스 검색

Fix extension handling

master
Chris Smith 5 년 전
부모
커밋
a14bfec362
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      certs/monitor.go

+ 2
- 1
certs/monitor.go 파일 보기

@@ -58,8 +58,9 @@ func (c *CertificateMonitor) scanForCerts(vhost string, dir string) {
58 58
 	for _, f := range files {
59 59
 		ext := path.Ext(f.Name())
60 60
 		base := path.Base(f.Name())
61
+		base = base[:len(base)-len(ext)]
61 62
 		c.logger.Debugf("File %s has extension %s, base name %s", f.Name(), ext, base)
62
-		if ext == "pem" {
63
+		if ext == ".pem" {
63 64
 			prefix := strings.Split(base, "-")[0]
64 65
 			added := maybeAddPart(&cert, prefix, path.Join(dir, f.Name()))
65 66
 			c.logger.Debugf("\tFile prefix is %s, added status %s", prefix, added)

Loading…
취소
저장