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

Merged
sarah merged 1 commits from dan/cwtch:fixStorage into master 2020-03-18 23:13:05 +00:00
1 changed files with 6 additions and 3 deletions
Showing only changes of commit a11b201f65 - Show all commits

View File

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