Skip to content

Commit 5a2f42d

Browse files
ansemjoFiloSottile
authored andcommitted
truststore: check if profile is a directory before joining cert*.db (FiloSottile#33)
1 parent 2e954de commit 5a2f42d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

truststore_nss.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ func (m *mkcert) forEachNSSProfile(f func(profile string)) (found int) {
9797
return
9898
}
9999
for _, profile := range profiles {
100+
if stat, err := os.Stat(profile); err != nil || !stat.IsDir() {
101+
continue
102+
}
100103
if _, err := os.Stat(filepath.Join(profile, "cert8.db")); !os.IsNotExist(err) {
101104
f("dbm:" + profile)
102105
found++

0 commit comments

Comments
 (0)