Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option "--dir-dat-name" truncates the internal name of some DATs #1412

Open
kriswilk opened this issue Jan 22, 2025 · 1 comment
Open

Option "--dir-dat-name" truncates the internal name of some DATs #1412

kriswilk opened this issue Jan 22, 2025 · 1 comment
Labels
potential-bug A potential issue that needs confirmation and/or triage

Comments

@kriswilk
Copy link

kriswilk commented Jan 22, 2025

Paste the command

npx --yes igir@latest copy zip test --dat 'C:\Users\kris\OneDrive\Desktop\Source Code - Atari - 8-bit Family (Parent-Clone) (20230107-012326).dat' --input "Y:\Media\Games\romvault\RomRoot\No-Intro\Source Code\Source Code - Atari - 8-bit Family" --output .\igir_output\ --dir-dat-name -vvv

Describe the bug

The "--dir-dat-name" option sometimes truncates the beginning of the internal DAT name. For example, the No-Intro DAT Source Code - Atari - 8-bit Family (Parent-Clone) (20230107-012326).dat has the internal name Source Code - Atari - 8-bit Family (Parent-Clone). Yet its matches are deposited into Atari - 8-bit Family with all regular game ROMs.

This leads to mixing of distinct media and confusing "repeated" output entries, like this:

Image

Expected behavior

In the example above, I'd have expected (and desired) that matches are written to Source Code - Atari - 8-bit Family to match the name in the DAT file.

FWIW, the same thing happens for No-Intro's "Unofficial - xxxx" DATs... that prefix is stripped when making directories, too.

If this behaviour is by design, please clarify why.

Debug logs

igir.log

DAT(s) used

Source Code - Atari - 8-bit Family (Parent-Clone) (20230107-012326).dat

igir version

3.0.1

Node.js version

23.6.0

Operating system

Windows 11

Additional context

No response

@kriswilk kriswilk added the potential-bug A potential issue that needs confirmation and/or triage label Jan 22, 2025
@kriswilk
Copy link
Author

kriswilk commented Jan 22, 2025

@emmercm Looking at the source code, specifically here, it's clear that you designed this behaviour deliberately. But why??

Selectively changing the name specified in the DAT is, IMHO, a bad choice... especially if it results in two DATs being merged silently into one directory. I still consider this a bug, since you could end up with filename collisions this way, couldn't you??

RomVault definitely doesn't do anything like this (other than trim the P/C suffix EDIT: it doesn't trim anything). I don't think igir should, either.

I look forward to your input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential-bug A potential issue that needs confirmation and/or triage
Projects
None yet
Development

No branches or pull requests

1 participant