diff options
Diffstat (limited to 'config/accounts.go')
-rw-r--r-- | config/accounts.go | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/config/accounts.go b/config/accounts.go index dbc0cdb4..413b77b1 100644 --- a/config/accounts.go +++ b/config/accounts.go @@ -119,14 +119,16 @@ const ( var Accounts []*AccountConfig -func parseAccounts(root string, accts []string) error { - filename := path.Join(root, "accounts.conf") - err := checkConfigPerms(filename) - if errors.Is(err, os.ErrNotExist) { - // No config triggers account configuration wizard - return nil - } else if err != nil { - return err +func parseAccounts(root string, accts []string, filename string) error { + if filename == "" { + filename = path.Join(root, "accounts.conf") + err := checkConfigPerms(filename) + if errors.Is(err, os.ErrNotExist) { + // No config triggers account configuration wizard + return nil + } else if err != nil { + return err + } } log.Debugf("Parsing accounts configuration from %s", filename) |