alucryd / oxyromon

Rusty ROM OrgaNizer
Other
110 stars 13 forks source link

Converting between two archive formats fails if archive contains more than one rom #141

Closed docbobo closed 2 days ago

docbobo commented 1 week ago

Trying to convert a 7Z that contains a .bin and a .cue to ZIP fails after the first item has been processed, since convert_roms deletes the archive after each extraction. This happens in either direction.

While I do have a fix in my fork, I suspect that a) you can fix this quicker yourself, and b) I noticed that your development branch is already quite ahead of main, where I applied my change.

alucryd commented 1 week ago

Can't seem to reproduce on the develop branch. I did rewrite quite a bit to introduce the recompress flag and probably fixed this one on the way.

docbobo commented 1 week ago

I only noticed the progress on the develop branch after I looked into the problem myself. Will give it a try later today, including the changes for the other issue.

Thanks.

docbobo commented 1 week ago

As far as I can tell, the current develop version does not delete the source archive at all. After the conversion, I end up with both 7z and zip files. For some reason, this results in a subsequent error on my Linux box though I do not get that error on my Mac.

Anyway, once there's only one archive in the end, that error goes away.

alucryd commented 1 week ago

Thanks for the follow-up, I'll adapt the unit test and fix the remaining issue!

alucryd commented 1 week ago

I was indeed missing a delete statement. Added in https://github.com/alucryd/oxyromon/commit/d8cef5c82a90c85d41c9dae3298f531ee986af10, along with an appropriate unit test. Thanks!