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

Prevent file name collision #1201

Closed
Djabal opened this issue Jul 6, 2024 · 4 comments · Fixed by #1208
Closed

Prevent file name collision #1201

Djabal opened this issue Jul 6, 2024 · 4 comments · Fixed by #1208
Assignees
Labels
enhancement New feature or request

Comments

@Djabal
Copy link

Djabal commented Jul 6, 2024

Is your feature request related to a problem?

Do not write the same file twice in one copy/move/zip/whatever.

Two use case :

Describe the solution you'd like

Igir could write a warning when it detect that it gonna overwrite a file he wrote in the same run, and of course don't overwrite.
"The name file "maria.rom" seems to be used by two games [put here games details for identification]. Currently the file "maria.rom" contains the game [the game detail]."

Additional context

No response

@Djabal Djabal added the enhancement New feature or request label Jul 6, 2024
@emmercm
Copy link
Owner

emmercm commented Jul 8, 2024

Can you tell me more about your specific use case?

It generally does not make sense to have two DATs write their files to the same directory. That's why the various --dir-dat-* options exist. And DATs don't (or shouldn't) have files of the same name with different checksums.

@emmercm emmercm self-assigned this Jul 8, 2024
@Djabal
Copy link
Author

Djabal commented Jul 9, 2024

I was importing ps3 bios in my bios folder, igir said it has found and write 3 bioses. But when I ask a report on the bios folder it had only 1 bios. Take me some time to understand where was the problem.

<game name="[BIOS] PS3 System Software Update (World) (v4.88)" id="12137">
  <description>[BIOS] PS3 System Software Update (World) (v4.88)</description>
  <rom name="PS3UPDAT.PUP" size="206146716" crc="9d98af0b" md5="a0b63a3e4ae92ed176d6b9a67ce447f0" [...]>
</game>
<game name="[BIOS] PS3 System Software Update (World) (v4.89)" id="12138">
  <description>[BIOS] PS3 System Software Update (World) (v4.89)</description>
  <rom name="PS3UPDAT.PUP" size="206197040" crc="29705956" md5="95307e1b51d3bcc33a274db91488d29f" [...]/>
</game>

If Igir had warn me it was rewriting 3 times the same filename I'll have understood faster.

Maybe you're right about having two DATs write their files to the same directory, I dun know !

Ty,

@emmercm
Copy link
Owner

emmercm commented Jul 10, 2024

Every time I think I know what the standards of various DAT groups are, they surprise me 🙂.

I'll think about how I want to handle a conflict warning/error, I think it's a good suggestion.

In the meantime, I'll fix up parent/clone inference for this so you can use --single --prefer-revision-newer or other 1G1R options.

@Djabal
Copy link
Author

Djabal commented Jul 14, 2024

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants