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

FIX: Dereference symlinks before hardlinking #5684

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Alch-Emi
Copy link
Contributor

@Alch-Emi Alch-Emi commented Mar 23, 2025

When creating a hardlink, either during import or beet convert, if the origin of the hardlink was a symlink, that symlink used to be directly copied. This could create broken symlinks if the origin symlink was relative, and in either case, probably wasn't the user's desired behavior.

This change de-references all symlinks before creating a hardlink, such that the end result is a normal file with the same inode as the original file. See #5676 for more discussion about the original issue.

Fixes #5676

  • Documentation (N/A)
  • Changelog
  • Tests

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

Successfully merging this pull request may close these issues.

convert: Relative symlinks broken upon convert with -H
1 participant