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

--overwrite doesn't overwrite broken symlinks #1406

Open
dirn opened this issue Jan 2, 2025 · 0 comments
Open

--overwrite doesn't overwrite broken symlinks #1406

dirn opened this issue Jan 2, 2025 · 0 comments
Labels
potential-bug A potential issue that needs confirmation and/or triage

Comments

@dirn
Copy link

dirn commented Jan 2, 2025

Paste the command

igir link test --symlink --overwrite --dat=$DAT_PATH/ --input=$BACKUPS/OSCR/ --output=$HOME/ROMs/{es}/

Describe the bug

I had a few bad dumps that were symlinked into my ROMs folder without DAT verification. I deleted the source file, placing the symlinks in a broken state. I redumped the games, placing the new dumps in a different location than the originals. I ran the above command and received errors. The broken symlinks were left behind.

Expected behavior

I expected the broken symlinks to be removed and replaced with ones pointing to the files matched by igir.

Debug logs

[14:41:28.587] INFO:  CandidateWriter: Nintendo - Nintendo Entertainment System (Headered): Ninja Gaiden (USA): creating symlink '/Users/dirn/Backups/OSCR/nes/Ninja Gaiden (USA).nes' →
'/Users/dirn/ROMs/nes/Ninja Gaiden (USA).nes'
[14:41:28.588] ERROR: CandidateWriter: Nintendo - Nintendo Entertainment System (Headered): Ninja Gaiden (USA): /Users/dirn/ROMs/nes/Ninja Gaiden (USA).nes: failed to link from
/Users/dirn/Backups/OSCR/nes/Ninja Gaiden (USA).nes: EEXIST: file already exists, symlink '/Users/dirn/Backups/OSCR/nes/Ninja Gaiden (USA).nes' ->
'/Users/dirn/ROMs/nes/Ninja Gaiden (USA).nes'

DAT(s) used

No response

igir version

3.0.1

Node.js version

N/A

Operating system

macOS 15.2

Additional context

I only receive the errors for games that have broken symlinks. If I manually remove those, new ones are created. And subsequent runs don't error.

@dirn dirn added the potential-bug A potential issue that needs confirmation and/or triage label Jan 2, 2025
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