Toucan-Org / TMM

A mod manager for Kerbal Space Program 2.
MIT License
17 stars 1 forks source link

Mod Installation is not uniform #9

Closed Loki-Lokster closed 1 year ago

Loki-Lokster commented 1 year ago

Description

The directory layout from downloaded mods is not always the same, most allow you to directly copy into root KSP2 folder and they will go into /BepInEx/plugins or similar, but a few mods will just have a folder with the mod name or a plugins directory.

Potential Solutions:

Potentially use regex to get the first folder name and make a best guess as to where to put it depending on the name of the first directory. For example, if the first directory we see is plugins we know to extract it directly into KSP2/BepInEx/ where it will overwrite the existing folder, whereas if the first directory we see from unzip is something like atmoswitch then it most likely has to go into KSP2/BepInEx/plugins/.

Loki-Lokster commented 1 year ago

Hopefully fixed in 1b62ed8. Will not touch this again until the C# rewrite