mirror of https://github.com/Xhofe/alist
fix: delete account driver after get
parent
7c4d28d55a
commit
0d4542a3f1
|
@ -63,11 +63,11 @@ func UpdateAccount(ctx context.Context, account model.Account) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.WithMessage(err, "failed update account in database")
|
return errors.WithMessage(err, "failed update account in database")
|
||||||
}
|
}
|
||||||
|
accountDriver, err := GetAccountByVirtualPath(oldAccount.VirtualPath)
|
||||||
if oldAccount.VirtualPath != account.VirtualPath {
|
if oldAccount.VirtualPath != account.VirtualPath {
|
||||||
// virtual path renamed, need to drop the account
|
// virtual path renamed, need to drop the account
|
||||||
accountsMap.Delete(oldAccount.VirtualPath)
|
accountsMap.Delete(oldAccount.VirtualPath)
|
||||||
}
|
}
|
||||||
accountDriver, err := GetAccountByVirtualPath(oldAccount.VirtualPath)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.WithMessage(err, "failed get account driver")
|
return errors.WithMessage(err, "failed get account driver")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue