SMAPI icon indicating copy to clipboard operation
SMAPI copied to clipboard

Automatically unzip loose .zip files present in Mods folder.

Open AnotherPillow opened this issue 1 year ago • 1 comments

Automatically finds .zip files in the Mods folder root, and automatically unzips them into the Mods folder.

AnotherPillow avatar Jan 20 '24 21:01 AnotherPillow

I feel like this PR would create more problems than it would solve, as it's not backwards compatible. If a user had .zip files stored in their Mods folder for whatever reason (for example, mod backups), you'd suddenly start extracting these without prompting the user.

Shockah avatar Jan 20 '24 22:01 Shockah

Thanks!

I think there are some edge cases we'd need to think about though. For example:

  • It's a zip that's not meant to be installed (like a backup, disabled mod, download that's already extracted, etc). I know I've intuitively disabled folders in both Stardew Valley and other games by zipping them.
  • It's already installed (possibly with a different folder path).
  • It has files directly in the root of the zip.
  • It's not a valid mod.
  • It's not a valid .zip.

It might also be confusing that .zip files are unpacked, but other formats like .rar and .7z aren't.

I prefer avoiding automatic behavior that might be unexpected or cause unexpected effects. I think there'd be less potential issues with logging a message which explains how to unzip them instead (if the player wants to).

So I'll close this, but I do appreciate the pull request!

Pathoschild avatar Jul 06 '24 02:07 Pathoschild