mirror of https://github.com/Xhofe/alist
🐛 fix multiple accounts with the same prefix cannot be load balanced
parent
f5c5162a9b
commit
ba99c7dc03
|
@ -108,7 +108,7 @@ func GetAccount(name string) (Account, bool) {
|
|||
func GetAccountsByName(name string) []Account {
|
||||
accounts := make([]Account, 0)
|
||||
for _, v := range accountsMap {
|
||||
if v.Name == name || (strings.HasSuffix(v.Name, balance) && strings.HasPrefix(v.Name, name)) {
|
||||
if v.Name == name || v.Name == name+balance {
|
||||
accounts = append(accounts, v)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue