Commit dfbec92d authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Return error in ParseAndroidStorage() if file not found

parent 2228b35b
......@@ -89,9 +89,12 @@ func (cm *CredentialManager) Init(path string, keyshareHandler KeyshareHandler)
// CAREFUL: this method overwrites any existing secret keys and attributes on storage.
func (cm *CredentialManager) ParseAndroidStorage() (err error) {
exists, err := PathExists(cm.path(cardemuXML))
if err != nil || !exists {
if err != nil {
if !exists {
return errors.New("cardemu.xml not found at " + cardemuXML)
bytes, err := ioutil.ReadFile(cm.path(cardemuXML))
if err != nil {
Supports Markdown
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