mirror of
https://github.com/FiloSottile/mkcert.git
synced 2025-10-14 00:41:40 +08:00
truststore: check if profile is a directory before joining cert*.db (#33)
This commit is contained in:

committed by
Filippo Valsorda

parent
2e954de528
commit
5a2f42dee6
@@ -97,6 +97,9 @@ func (m *mkcert) forEachNSSProfile(f func(profile string)) (found int) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, profile := range profiles {
|
for _, profile := range profiles {
|
||||||
|
if stat, err := os.Stat(profile); err != nil || !stat.IsDir() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if _, err := os.Stat(filepath.Join(profile, "cert8.db")); !os.IsNotExist(err) {
|
if _, err := os.Stat(filepath.Join(profile, "cert8.db")); !os.IsNotExist(err) {
|
||||||
f("dbm:" + profile)
|
f("dbm:" + profile)
|
||||||
found++
|
found++
|
||||||
|
Reference in New Issue
Block a user