Merge pull request 'fix storage pretending to load stores it does not have a password for' (#301) from dan/cwtch:fixStorage into master

Этот коммит содержится в:
Sarah Jamie Lewis 2020-03-18 16:13:04 -07:00
родитель 438f05c4af a11b201f65
Коммит f952fbc680
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

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