fix storage pretending to load stores it does not have a password for

This commit is contained in:
Dan Ballard 2020-03-18 16:10:03 -07:00
rodzic 438f05c4af
commit a11b201f65
1 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -97,10 +97,13 @@ func LoadProfileWriterStore(eventManager event.Manager, directory, password stri
ps := &ProfileStoreV1{fs: NewFileStore(directory, profileFilename, key), key: key, directory: directory, profile: nil, eventManager: eventManager, streamStores: map[string]StreamStore{}, writer: true}
copy(ps.salt[:], salt)
err = ps.load()
if err != nil {
return nil, err
}
ps.initProfileWriterStore()
ps.load()
return ps, nil
}