iquercorb / OpenModMan

Open Mod Manager - Open source and generic Mod ("Modifications") manager.
GNU General Public License v3.0
95 stars 5 forks source link

[BUG/Wrong Logic] Edit channel path with already installed mods #93

Closed lmiol closed 5 months ago

lmiol commented 5 months ago
  1. Add a channel path C:\game
  2. Install mod HEAD (resulting in it being installed to C:\game\texture.png)
  3. Edit the channel
  4. change path to a new D:\gamecopyanother\ and click Apply (as result mod HEAD still installed with green checkmark Icon)
  5. Click on "uninstall mod HEAD"

Actual result: OMM tries to uninstall from the new path D:\gamecopyanother\texture.png and shows it as completed (since the green icon disappears), but in reality the file texture.png is still in C:\game\

What's wrong with this logic? 1 After confirming the path change, the green checkmark is still visible, but the file is actually installed in the old path, so considering the mod installed in the new path is incorrect.

  1. After Uninstall mod user can seeing the green icon disappear, users may think the mod has been uninstalled, but it has not.

I believe there are a few different ways to improve this logic:

  1. After editing the channel to a new path, there could be an alert: "You have installed mods on the previous path. What would you like to do? Delete, Move, Cancel."

    • Delete: Deletes from the old path
    • Move: Moves mods to the new path
    • Cancel: Cancels the path edit
  2. Mods could be automatically moved to the new path. So green icons will stay

  3. After editing the channel to a new path all green icons will disappear (since mods are not installed on the new path).

I think option 3 is the easiest to implement and satisfactory to complete the logic of editing paths on the same channel, because if user will edit chanel back to previous path the green icon will appear again, because mod installed.

reproduced 1.2.7 (1.2.8 too)

Regards

iquercorb commented 5 months ago

Fixed in source code. It is now impossible to change target directory if channel still have backup data. If user attempt to modify target directory, a warning message appear to inform he must fist uninstall all mods or discard all backup data.