simplify delete account when change name

This commit is contained in:
微凉
2021-11-17 15:25:31 +08:00
parent e8d27a30b4
commit e4d254e4b0
5 changed files with 3 additions and 10 deletions

View File

@ -349,9 +349,6 @@ func (a AliDrive) RefreshToken(account *model.Account) error {
func (a AliDrive) Save(account *model.Account, old *model.Account) error {
if old != nil {
conf.Cron.Remove(cron.EntryID(old.CronId))
if old.Name != account.Name {
model.DeleteAccountFromMap(old.Name)
}
}
if account.RootFolder == "" {
account.RootFolder = "root"