itchio / boar

🐗 boar will sniff and dismantle most archives you throw at it
MIT License
8 stars 4 forks source link

ZIP archives with an uppercase extension (*.ZIP) are not detected as such, and probably more #5

Open Rackover opened 2 years ago

Rackover commented 2 years ago

https://github.com/itchio/boar/blob/d2befc01fa9ecbea01b5425433997ef79fd492ed/probe.go#L236

hello! I cannot write in golang otherwise I would have made a PR directly. But I think a toLowerCase call, or equivalent, is required there on the extension check. Otherwise uppercase ZIP files cannot be installed by the itch game launcher.

image image

I've seen other people have this problem so this fix might help more than one :) have a good day!

leafo commented 2 years ago

The extension is normalized to lowercase here: https://github.com/itchio/boar/blob/d2befc01fa9ecbea01b5425433997ef79fd492ed/probe.go#L227

Error is being triggered here:

https://github.com/itchio/hush/blob/67599c10234330cdd2afa465bcec3ffbb3221d52/get_installer_info.go#L33

In the meantime I recommend using lowercase file extensions. If you are using butler to upload your game then it will automatically use an appropriate file extension.