atlanticaccent / starsector-mod-manager-rust

A mod manager for Starsector, a space fleet-battle and economics simulator. This time written in Rust.
https://atlanticaccent.github.io/starsector-mod-manager-rust/
MIT License
33 stars 1 forks source link

Folder names are not preserved #71

Closed jaghaimo closed 3 years ago

jaghaimo commented 3 years ago

ModManager should respect the names of the folders when updating a mod. Instead, it deletes an existing folder and creates mod-default one.

Reproduce

Organise your mods by renaming their default folders, for example:

000 LIBRARIES
001 LazyLib
002 MagicLib
003 GraphicsLib
010 UTILITIES
011 SomeUltility

Upgrade LazyLib - 001 LazyLib is replaced with LazyLib.2.6. Expected: 001 LazyLib is preserved as mod folder, contents updates.

atlanticaccent commented 3 years ago

This arises when upgrading/replacing through the mod ID collision code, as opposed to the folder name collision code.

I believe my reasoning for this was that the original folder (aka the folder being deleted) might be named by a specific version - like "magiclib_2.1.6" or similar. Unpacking magiclib v2.1.7 into that folder might then be misleading.

However, this does also clobber custom folder names or folder names that don't match the mod ID too. I'm not sure which behaviour is preferable.

jaghaimo commented 3 years ago

Perhaps both? An option in settings to chose which naming convention to use (e.g. boolean - preserve folder names, default off).

And if you feel generous - a select box with: