emmercm / igir

🕹 A video game ROM collection manager to help filter, sort, patch, archive, and report on collections on any OS.
https://igir.io/
GNU General Public License v3.0
306 stars 15 forks source link

igir creates a lot of empty files for certain libretro dat files #822

Closed juliadin closed 7 months ago

juliadin commented 7 months ago

Paste the command

npm exec --yes -- 'github:emmercm/igir#main' move --dat 'https://raw.githubusercontent.com/libretro/libretro-database/master/dat/Nintendo%20-%20Wii.dat' -i testsrc/ -o testdest/

Describe the bug

assuming testsrc/ contains just an empty file and testdest/ is empty or doesn't exist, igir will create a lot of .iso files in testdest/ with 0 bytes

Expected behavior

igir should to my expectation not create any files since none of the roms are found

Debug logs

igir_debug.log

DAT(s) used

https://raw.githubusercontent.com/libretro/libretro-database/master/dat/Nintendo%20-%20Wii.dat

igir version

2.1.1

Node.js version

18.18.2

Operating system

Debian Linux 12

Additional context

i noticed that this happens with the gamecube, wii U and ps3 dats in the same dir, too. They all have in common that the .dat files do not mention checksums for the roms.

juliadin commented 7 months ago

This also leads to igir falsely reporting that the dat is 'complete' ... which it does - to be fair - to the best of it's knowledge considering the .dats do neither contain a file size nor a checksum.

emmercm commented 7 months ago

This makes a lot of sense. Those DATs don't have CRCs for the files, so it's defaulting to 00000000, which is also the CRC32 of an empty file.

I think a solution would be to ignore CMPro ROMs that don't have any checksum information, resulting in these games having zero ROMs. The games would still get considered as "found" because games with zero ROMs can't be "missing" has been my thought process.

Thoughts about that?

juliadin commented 7 months ago

I think it’s a good solution. Sounds very annoying to deal with from the software side. Sorry to hear that.

Would it be possible to not even count games that have no roms? or deal with them in the summary lines differently? like … 1/3 retail releases written, 4422 releases with incomplete entries? I’d think that would be a little more obvious

emmercm commented 7 months ago

Fixed by https://github.com/emmercm/igir/pull/835

juliadin commented 7 months ago

Thanks a lot! 🫶

github-actions[bot] commented 6 months ago

:lock: Inactive issue lock

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Comment generated by the GitHub Lock Issues workflow.