mirror of
https://github.com/alist-org/alist.git
synced 2026-06-05 21:04:08 +08:00
fix(storage): clear list cache after storage updates
This commit is contained in:
parent
527ad89362
commit
ffbbe7a96f
@ -229,10 +229,13 @@ func UpdateStorage(ctx context.Context, storage model.Storage) error {
|
||||
if err != nil {
|
||||
return errors.WithMessage(err, "failed update storage in database")
|
||||
}
|
||||
storageDriver, err := GetStorageByMountPath(oldStorage.MountPath)
|
||||
if err == nil {
|
||||
ClearCache(storageDriver, "/")
|
||||
}
|
||||
if storage.Disabled {
|
||||
return nil
|
||||
}
|
||||
storageDriver, err := GetStorageByMountPath(oldStorage.MountPath)
|
||||
if oldStorage.MountPath != storage.MountPath {
|
||||
// mount path renamed, need to drop the storage
|
||||
storagesMap.Delete(oldStorage.MountPath)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user