소스 검색

Fix error condition for checking cert timestamps

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

+ 1
- 1
certs/deployer.go 파일 보기

@@ -81,7 +81,7 @@ func (c *CertificateDeployer) deployFile(name string, content []byte, modTime ti
81 81
 	}
82 82
 
83 83
 	info, err := os.Stat(target)
84
-	if err != nil && info.ModTime().After(modTime) {
84
+	if err == nil && info.ModTime().After(modTime) {
85 85
 		c.logger.Debugf("Not writing %s as it was modified more recently than our cert", target)
86 86
 		return
87 87
 	}

Loading…
취소
저장