meza/minecraft-mod-manager

Mismatch file detection - iteration 2

Opened this issue · 0 comments

meza commented

There has been a temporary, iteration 1 version of this done in #233 but it's far from elegant.

Here's what needs to be done:

Every operation should verify that the lockfile only contains mods that are in the config.
Every operation should evaluate the files in the mods directory.

A file could be:

  • fully managed (appears in the config and the lockfile)
  • partially managed (appears in the config but NOT in the lockfile)
  • mismatched (appears in the config but the lockfile hash differs)
  • not managed (does not appear in the config or the lockfile)

The list of mod files in the mod directory will have to come as a list with either one of the statuses above and every operation should deal with them accordingly.

The INSTALL (and consequently the UPDATE) action should remove the file in error and use whatever is in the lockfile
The SCAN action should ask what to do
The LIST action should show these statuses too

With these changes, the SCAN functionality might get redundant or change in responsibility.

Originally posted by @meza in #233 (comment)