alucryd / oxyromon

Rusty ROM OrgaNizer
Other
110 stars 13 forks source link

trying to convert from zip to original just deleted files #144

Closed anderbubble closed 2 days ago

anderbubble commented 5 days ago

If I import a zipped romset:

$ oxyromon import-roms new-romsets/Roms/FC/
Processing "Life Force (USA) (Rev 1).zip"
Processing "Life Force (USA) (Rev 1).nes (Life Force (USA) (Rev 1).zip)"
Matches "Life Force (USA) (Rev 1) (Virtual Console).nes"
[...]

But then use convert-roms to try to convert to .nes:

$ oxyromon convert-roms --system "Nintendo - Nintendo Entertainment System" --format ORIGINAL
Processing "Nintendo - Nintendo Entertainment System (Headered)"
Deleting "/home/janderson/Emulation/Nintendo - Nintendo Entertainment System/Shadow of the Ninja (USA).zip"
[...]

It just deletes all of the roms.

$ ls ~/Emulation/Nintendo\ -\ Nintendo\ Entertainment\ System/
'Kid Dracula (World) (Castlevania Anniversary Collection).sav'
alucryd commented 4 days ago

Hmm, not sure how this got through the cracks as convert-roms is riddled with unit tests. Is that happening with the latest stable release? Have you tried the develop branch? The CI builds a docker image, but I can have it build plain binaries as well if needed: https://hub.docker.com/r/alucryd/oxyromon

anderbubble commented 4 days ago

I'm running from a build I did in master, commit f415026b9dd63f97f303728bfe342292586a1fb8.

$ oxyromon --version
oxyromon 0.18.1
alucryd commented 2 days ago

I can reproduce on the develop branch too, this is quite bad, and my unit test passes just fine, I must be missing something. Will try to fix this quickly so I can release a fix asap.

alucryd commented 2 days ago

Oh wow, found the issue, a typo in a filter that was comparing the wrong IDs, except in the unit test these wrong IDs happened to match, so the file was still extracted correctly... It's going to be a pain to secure this one, but I've at least put up a fix in https://github.com/alucryd/oxyromon/commit/7322b193371c1ca092a90c266db98711c0a652bc

anderbubble commented 2 days ago

Thanks for investigating! I'd like to get to the point where I could contribute a PR here and there (mostly as an opportunity to learn rust) so I'll be watching the fixes with interest. ❤️