Sfoglia il codice sorgente

firefox: prefer cert9.db and skip cert8.db when found (#13)

Fixes #12 (again)
Adam Shannon 6 anni fa
parent
commit
1e7d221386
1 ha cambiato i file con 5 aggiunte e 4 eliminazioni
  1. 5 4
      truststore_nss.go

+ 5 - 4
truststore_nss.go

@@ -100,13 +100,14 @@ func (m *mkcert) forEachNSSProfile(f func(profile string)) (found int) {
 		if stat, err := os.Stat(profile); err != nil || !stat.IsDir() {
 			continue
 		}
-		if _, err := os.Stat(filepath.Join(profile, "cert8.db")); !os.IsNotExist(err) {
-			f("dbm:" + profile)
-			found++
-		}
 		if _, err := os.Stat(filepath.Join(profile, "cert9.db")); !os.IsNotExist(err) {
 			f("sql:" + profile)
 			found++
+			continue
+		}
+		if _, err := os.Stat(filepath.Join(profile, "cert8.db")); !os.IsNotExist(err) {
+			f("dbm:" + profile)
+			found++
 		}
 	}
 	return