mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-21 20:18:47 +08:00
fix: delete account driver after get
This commit is contained in:
parent
7c4d28d55a
commit
0d4542a3f1
@ -63,11 +63,11 @@ func UpdateAccount(ctx context.Context, account model.Account) error {
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "failed update account in database")
|
||||
}
|
||||
accountDriver, err := GetAccountByVirtualPath(oldAccount.VirtualPath)
|
||||
if oldAccount.VirtualPath != account.VirtualPath {
|
||||
// virtual path renamed, need to drop the account
|
||||
accountsMap.Delete(oldAccount.VirtualPath)
|
||||
}
|
||||
accountDriver, err := GetAccountByVirtualPath(oldAccount.VirtualPath)
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "failed get account driver")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user