alucryd / oxyromon

Rusty ROM OrgaNizer
Other
127 stars 14 forks source link

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

Closed docbobo closed 4 months ago

docbobo commented 5 months 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 5 months 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 5 months 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 5 months 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 5 months ago

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

alucryd commented 5 months ago

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