Commit 1093f9d0 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Error if irma_configuration does not exist

parent dd3437ff
......@@ -99,6 +99,11 @@ func NewCredentialManager(
Store: NewConfigurationStore(storagePath + "/irma_configuration"),
}
exists, err := PathExists(cm.irmaConfigurationPath)
if !exists {
return nil, errors.New("irmaConfigurationPath does not exist")
}
// Ensure storage path exists, and populate it with necessary files
cm.storagePath = storagePath
if err = cm.ensureStorageExists(); err != nil {
......@@ -225,9 +230,6 @@ func (cm *CredentialManager) ensureStorageExists() error {
return err
}
cm.Store.Copy(cm.irmaConfigurationPath, false)
if err = cm.Store.ParseFolder(); err != nil {
return err
}
}
return ensureDirectoryExists(cm.path(signaturesDir))
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment