Procházet zdrojové kódy

Fix error condition for checking cert timestamps

master
Chris Smith před 5 roky
rodič
revize
f523b6a4ef
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1
    1
      certs/deployer.go

+ 1
- 1
certs/deployer.go Zobrazit soubor

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

Načítá se…
Zrušit
Uložit