Skip to content

Commit

Permalink
Merge pull request #105 from msladek/master
Browse files Browse the repository at this point in the history
  • Loading branch information
hazcod authored Jan 3, 2022
2 parents 0c57602 + a29c158 commit 934bcd2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/enpass/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ func (v *Vault) Initialize(databasePath string, keyfilePath string, password str
return errors.Wrap(err, "could not open encrypted database")
}

var tableName string
err = v.db.QueryRow(`
SELECT name
FROM sqlite_master
WHERE type='table' AND name='item'
`).Scan(&tableName)
if err != nil {
return errors.Wrap(err, "could not connect to database")
} else if tableName != "item" {
return errors.New("could not connect to database")
}

return nil
}

Expand Down

0 comments on commit 934bcd2

Please sign in to comment.