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
392 stars 18 forks source link

NES ROMs have headers stripped unexpectedly #1369

Closed ahknight closed 1 month ago

ahknight commented 1 month ago

Paste the command

npx --yes igir@latest move zip test clean report \
  --dat "./DATs/No-Intro*PC*.zip" \
  --dat-name-regex-exclude "/encrypted/i" \
  --input "./${CONSOLE_GAMES}/" \
  --input "${CONSOLE_GAMES_BACKUPS}" \
  "${INPUTS[@]:-}" \
  --input-checksum-max CRC32 \
  --input-checksum-archives never \
  --output "./${CONSOLE_GAMES}" \
  --dir-dat-name \
  --overwrite-invalid \
  --clean-backup "${CONSOLE_GAMES_BACKUPS}" \
  --zip-exclude "*.{chd,iso,pbp,cue,bin}" \
  -v

Describe the bug

When using the zipped daily from No-Intro, IGIR chooses to use the "unheadered" DAT for NES and strips the headers of all ROMs.

Expected behavior

It should not strip headers from NES ROMs without confirmation. There exists no flag to disable this "feature" and I can't get the ROMs to match the "Headered" DAT.

Debug logs

This isn't a single case; this happens with any NES romset input and the full No-Intro DAT set.

DAT(s) used

No response

igir version

3.0.1

Node.js version

22.9.0

Operating system

macOS

Additional context

No response

emmercm commented 1 month ago

Duplicate of https://github.com/emmercm/igir/issues/1346.

Igir isn't "choosing" the headerless DAT, your zip file provides it. The files that Igir writes will exactly match what DATs contain.

To ignore the DAT, use the --dat-name-regex-exclude "/headerless/i" option. Example here: https://igir.io/usage/personal/#analogue-pocket

ahknight commented 1 month ago

One doesn't expect a ROM organization tool to modify the ROMs, in general. I really think it needs an explicit switch to prevent changes to ROMs, especially given the focus on archival and preservation in this arena.

emmercm commented 1 month ago

The behavior is documented here. When using the No-Intro daily download packs, both the headered and headerless DATs are provided. When following Igir's best practices with organizing written files by DAT (or only supplying one DAT at a time), both copies would be written, so there's no data loss. Igir will also prevent both DATs from writing to the same output location, to avoid any race conditions.

To me, this is expected behavior -- a headerless DAT cataloged headerless ROMs, and Igir knows how to fulfill that request. But I'll continue to listen to feedback.

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