cmd/maddyctl: Fix imapsql module name mismatch

Forgotten after sql->imapsql rename.
This commit is contained in:
fox.cpp 2020-03-22 03:06:09 +03:00
parent 393a2ec08d
commit 134342a366
No known key found for this signature in database
GPG key ID: E76D97CCEDE90B6C
2 changed files with 4 additions and 4 deletions

View file

@ -619,7 +619,7 @@ func openStorage(ctx *cli.Context) (Storage, error) {
var store Storage
switch node.Name {
case "sql":
case "imapsql":
store, err = sqlFromCfgBlock(root, node)
if err != nil {
return nil, err
@ -656,7 +656,7 @@ func openUserDB(ctx *cli.Context) (UserDB, error) {
}
switch node.Name {
case "sql":
case "imapsql":
return sqlFromCfgBlock(root, node)
default:
return nil, errors.New("Error: Authentication backend is not supported by maddyctl")

View file

@ -18,12 +18,12 @@ func sqlFromCfgBlock(root, node config.Node) (*imapsql.Storage, error) {
return nil, err
}
instName := "sql"
instName := "imapsql"
if len(node.Args) >= 1 {
instName = node.Args[0]
}
mod, err := imapsql.New("sql", instName, nil, nil)
mod, err := imapsql.New("imapsql", instName, nil, nil)
if err != nil {
return nil, err
}