You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mods): stop duplicate jars when update/downgrade renames the file
Old and new jar were replaced with two independent, unchecked
File.delete()/renameTo() calls. When the file name changes between
versions, these are separate filesystem entries; if delete() of the
old jar transiently failed (e.g. briefly held open by an icon/name
resolution read) the failure was silently ignored and the new file
still got created, leaving both jars on disk as a duplicate on next
scan. Same-name updates never showed this because renameTo() onto an
existing path atomically replaces it, masking the ignored delete
failure.
Added a shared replaceModFile() helper used by both applyUpdate() and
applySwitchVersion(): renames the new file into place first, then
explicitly deletes the old one (skipped when the name didn't change,
since rename already replaced it), retrying the delete a few times
with backoff before giving up and logging a warning.
0 commit comments