Fix SCUM config manifest refresh

This commit is contained in:
npc0-hue
2026-09-25 00:25:00 +08:00
parent 2f9b4b3780
commit abc392d22c
4 changed files with 38 additions and 5 deletions
+7 -3
View File
@@ -812,10 +812,14 @@ func (svc *CoreService) upsertLatestGamePlugin(plugin domain.GamePlugin) (domain
}
}
if current.ID != "" && !domain.GamePluginIsNewer(plugin, current) {
if err := svc.pruneOlderGamePluginVersions(current, matched); err != nil {
return domain.GamePlugin{}, err
// Re-registering the same stable manifest ID must refresh its declarative
// contract; file targets and action assets can be corrected in place.
if current.ID != plugin.ID || domain.CompareGamePluginVersions(plugin.Version, current.Version) != 0 {
if err := svc.pruneOlderGamePluginVersions(current, matched); err != nil {
return domain.GamePlugin{}, err
}
return domain.CopyGamePlugin(current), nil
}
return domain.CopyGamePlugin(current), nil
}
if _, err := svc.store.GamePlugins().Get(plugin.ID); err == nil {