emmercm / igir

🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.
https://igir.io/
GNU General Public License v3.0
404 stars 18 forks source link

Not deleting original file after successful `move` #425

Closed chainsawsalad closed 1 year ago

chainsawsalad commented 1 year ago

Paste the command

npx -yes igir@latest -vvv move --dat ./DATs/Redump/SNK\ -\ Neo\ Geo\ CD\ -\ Datfile\ \(111\)\ \(2022-09-23\ 17-55-26\).zip --input ../downloads/Garou\ Densetsu\ Special\ ~\ Fatal\ Fury\ Special\ \(Japan\)\ \(En\,Ja\).zip --output ./Redump_downloadtest/ --dir-dat-name

Describe the bug

I'm running into cases where the original files are not being deleted after a successful move to the output directory. It aborts the operation with the warning message not deleting moved file, XX archive entries were unmatched. It seems to occur with ROMs of the cue/bin format.

In the example I provide, I manually hashed each file to confirm it matched the DAT entries. It's a perfect match, so I'm unsure what the problem could be.

[20:28:22.553] INFO:  ROMWriter: SNK - Neo Geo CD: done writing 1 candidate
[20:28:22.556] INFO:  StatusGenerator: SNK - Neo Geo CD: generating ROM statuses
[20:28:22.579] INFO:  StatusGenerator: SNK - Neo Geo CD: done generating ROM statuses
✓ SNK - Neo Geo CD ············· | 1/111 games, 1/111 retail releases written
[20:28:22.584] INFO:  done processing 1 DAT
[20:28:22.591] INFO:  MovedROMDeleter: deleting moved ROMs
[20:28:22.594] WARN:  MovedROMDeleter: ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja).zip: not deleting moved file, 28 archive entries were
unmatched:
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 01).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 02).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 03).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 04).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 05).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 06).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 07).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 08).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 09).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 10).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 11).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 12).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 13).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 14).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 15).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 16).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 17).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 18).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 19).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 20).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 21).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 22).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 23).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 24).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 25).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 26).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 27).bin,
[20:28:22.594] WARN:  MovedROMDeleter:   Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja).cue
[20:28:22.606] DEBUG: MovedROMDeleter: deleting 0 moved files
[20:28:22.608] INFO:  MovedROMDeleter: done deleting moved ROMs

Expected behavior

When using the move command, ROMs that match a DAT entry should be copied to the output directory and then removed from the input directory.

Debug logs

Excerpt from SNK - Neo Geo CD - Datfile (111) (2022-09-23 17-55-26).dat:

    <game name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)">
        <category>Games</category>
        <description>Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)</description>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja).cue" size="3970" crc="e95e098f" md5="86e2bea7e948ff55564e646b2373aae4" sha1="ae6c9618aab99527135015bc4cb65f8edaaf7f5a"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 01).bin" size="25634448" crc="ef787662" md5="5796897e1d8ae5b87413cf592d4d8141" sha1="5df92d1c9be9d7b313753fac1c6b4a9efa275b4a"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 02).bin" size="4475856" crc="78699f8e" md5="6c4f316d952e9b3594d71508af50f93a" sha1="2fe5562e1373a496f700cfc22465f545f9b15e00"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 03).bin" size="4116000" crc="3ac9721f" md5="865d6e0b179b74bf33da645b3fd8ef81" sha1="047f97d551f3297f8d29f22fa9e78feef6347d70"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 04).bin" size="23268336" crc="439020bc" md5="98b1cfed664ce3442c6595a37d5841ae" sha1="921ab8f9eb0922f53e6ae06fe779ba933d503d4f"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 05).bin" size="7197120" crc="8041c8ff" md5="75de46ed078cf25032b1c67f04d60409" sha1="9c814bb938ef1aaa2c09564ae11c0c5a87b7ec67"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 06).bin" size="21396144" crc="48a79f55" md5="26f38eb1081df38ac9b8d5169428da12" sha1="bd614984e83aa5efa65f78f4e994cdf3925564c9"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 07).bin" size="4320624" crc="786c1186" md5="c9e09bf560521c1ac31ed507f53e8135" sha1="2366ea8a657f807799b4c88b4daf97246438f7dd"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 08).bin" size="3024672" crc="6f13eafd" md5="82dfe8f58f2e95d8b3d2b803816f90ba" sha1="41375a9ada4d53308eec6cad38a5b9c2866751da"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 09).bin" size="22560384" crc="0f960a71" md5="1eda0348826177c1d1d9f06e25bf4131" sha1="44ed12d24c3bca4c3122916c0f6601cfb171146b"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 10).bin" size="33965232" crc="f9d0fa44" md5="322ace3238bc175c8fc81dd0b4b4d50a" sha1="d095a3b176a0b2e11b94fb8d0828f481863959b6"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 11).bin" size="34066368" crc="db92e075" md5="41e3aedef6df59ccc277098a6fb03c60" sha1="ad90f194d1821c68926fbe39e69e2a30c3c6a6b8"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 12).bin" size="34487376" crc="3ca8ac07" md5="fd504423137eb3d16a3820eda6c101df" sha1="5c54a07148b8a3f69b7c9a9a022a3096114a7615"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 13).bin" size="34419168" crc="0980b41c" md5="99cade798b52bc951da171ed568549bb" sha1="542b9d06a7c47eb66977f5761fecdea94a6a72d0"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 14).bin" size="34496784" crc="d39752a2" md5="bd8a26fefed601fd96e55ba51ff7375a" sha1="4ee915b232c0eeeefecafe3d71cc69ed22ac4979"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 15).bin" size="34795488" crc="921b5654" md5="d4e67172cca7d8e84ffafcc36ad07ef9" sha1="d3d55b431e8445167dba5dca876fe6a177d38e96"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 16).bin" size="34318032" crc="dc369db5" md5="90f19751738f5ab8f2f1d4b19e57d911" sha1="9e43f950f3bdf786491f3a68cac2899620f408c8"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 17).bin" size="34195728" crc="44e50ef2" md5="5ac3819c15d23819e65319614bbeda81" sha1="203856a8352fd3ae6111e4fb099e9830cb3bd15e"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 18).bin" size="34223952" crc="5dcaef3f" md5="fb641fe9a5436ab52b169a648fbee75f" sha1="ab46cf81a1061aa3256b95aaabbffbcf36ece9eb"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 19).bin" size="33969936" crc="f83dc97b" md5="94abfed3b73ab474c42ded5b2e75e3ab" sha1="8818535bb62e11711bf7335a66cd284b8f5475eb"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 20).bin" size="34263936" crc="dce52e16" md5="564b06bd2e57964571de94ce8ec7f0fe" sha1="26a8f8ae4d6651f97663e7bbfe2067d3b7b87fec"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 21).bin" size="34322736" crc="fe60b2f9" md5="fe47ba8deffe97315ab3349b366f5eef" sha1="a23cf7bf44aedc53cd03ec1dcaa9d2b29f46be38"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 22).bin" size="22553328" crc="74bee513" md5="fb6eb6998a1055751ecdf061962e3cdc" sha1="1faa6f3e91efd59c967729e0fe02df5b34fef3b8"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 23).bin" size="34684944" crc="c534a8ec" md5="6d10882c400b1b556f9f7a68ec93f3ef" sha1="71f8ff3e196a8abb8e670e558fd955b46be59d18"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 24).bin" size="34569696" crc="3b094e2c" md5="1f2ce15e8fc6f246f1cd9b894770a8bf" sha1="81ce7de8815119cf5cd42b60636f8852dae0b355"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 25).bin" size="34454448" crc="8989ae66" md5="1d3a1878f0a5de791141749a320d88ff" sha1="43798f7e0a76e88c4171eba052275323e13ed865"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 26).bin" size="33826464" crc="37a9380a" md5="167eb654d9d24b83ae6ec4d6b3081133" sha1="3b6338e2309d8ebd59268ee099ae86419aa17385"/>
        <rom name="Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 27).bin" size="30959376" crc="64b5378e" md5="14cdabbef8edb139507a211ea457efee" sha1="414b1d4e46b8ba1d36cdcbc907b3951df79c112c"/>
    </game>

SHA1 hashes on file:

$ sha1sum ../downloads/Garou\ Densetsu\ Special\ ~\ Fatal\ Fury\ Special\ \(Japan\)\ \(En\,Ja\)/Garou\ Densetsu\ Special\ ~\ Fatal\ Fury\ Special\ \(Japan\)\ \(En\,Ja\)*
5df92d1c9be9d7b313753fac1c6b4a9efa275b4a  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 01).bin
2fe5562e1373a496f700cfc22465f545f9b15e00  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 02).bin
047f97d551f3297f8d29f22fa9e78feef6347d70  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 03).bin
921ab8f9eb0922f53e6ae06fe779ba933d503d4f  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 04).bin
9c814bb938ef1aaa2c09564ae11c0c5a87b7ec67  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 05).bin
bd614984e83aa5efa65f78f4e994cdf3925564c9  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 06).bin
2366ea8a657f807799b4c88b4daf97246438f7dd  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 07).bin
41375a9ada4d53308eec6cad38a5b9c2866751da  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 08).bin
44ed12d24c3bca4c3122916c0f6601cfb171146b  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 09).bin
d095a3b176a0b2e11b94fb8d0828f481863959b6  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 10).bin
ad90f194d1821c68926fbe39e69e2a30c3c6a6b8  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 11).bin
5c54a07148b8a3f69b7c9a9a022a3096114a7615  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 12).bin
542b9d06a7c47eb66977f5761fecdea94a6a72d0  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 13).bin
4ee915b232c0eeeefecafe3d71cc69ed22ac4979  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 14).bin
d3d55b431e8445167dba5dca876fe6a177d38e96  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 15).bin
9e43f950f3bdf786491f3a68cac2899620f408c8  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 16).bin
203856a8352fd3ae6111e4fb099e9830cb3bd15e  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 17).bin
ab46cf81a1061aa3256b95aaabbffbcf36ece9eb  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 18).bin
8818535bb62e11711bf7335a66cd284b8f5475eb  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 19).bin
26a8f8ae4d6651f97663e7bbfe2067d3b7b87fec  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 20).bin
a23cf7bf44aedc53cd03ec1dcaa9d2b29f46be38  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 21).bin
1faa6f3e91efd59c967729e0fe02df5b34fef3b8  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 22).bin
71f8ff3e196a8abb8e670e558fd955b46be59d18  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 23).bin
81ce7de8815119cf5cd42b60636f8852dae0b355  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 24).bin
43798f7e0a76e88c4171eba052275323e13ed865  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 25).bin
3b6338e2309d8ebd59268ee099ae86419aa17385  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 26).bin
414b1d4e46b8ba1d36cdcbc907b3951df79c112c  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja) (Track 27).bin
ae6c9618aab99527135015bc4cb65f8edaaf7f5a  ../downloads/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja)/Garou Densetsu Special ~ Fatal Fury Special (Japan) (En,Ja).cue

Logs too long to include, so see attached. igir_log.txt

igir version

1.6.2

Node.js version

18.12.0

Operating system

Linux

Additional context

No response

emmercm commented 1 year ago

Confirmed I'm seeing the same behavior on my end.

I'm also seeing a ton of not overwriting existing file TRACE logs, indicating every entry in the input zip is generating the same output file - but there should only be one.

github-actions[bot] commented 1 year 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.