You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When converting with the hardlink option, existing relative symlinks in the original beets library will be converted to broken symlinks in the destination.
# Setting up the initial librarycd~
mkdir -p BugDemo/MyArtist/MyAlbum
ln -s ../../../MyTrack.ogg BugDemo/MyArtist/MyAlbum/ # This should be a real, lossy music file, and a relative symlink
tree BugDemo/
# BugDemo/# └── MyArtist# └── MyAlbum# └── MyTrack.ogg -> ../../../MyTrack.ogg
beet import -CW BugDemo/ # metadata is irrelevant# Running the transcode
beet -vv convert -Hyd ./path/to/Destination/
# user configuration: /home/myuser/.config/beets/config.yaml# data directory: /home/myuser/.config/beets# plugin paths: # Sending event: pluginload# library database: /home/myuser/BugDemo/beets.db# library directory: /home/myuser/BugDemo# Sending event: library_opened# Parsed query: AndQuery([TrueQuery()])# Parsed sort: NullSort()# MyArtist - MyAlbum - MyTrack# Parsed query: AndQuery([NoneQuery('album_id', True)])# Parsed sort: NullSort()# Parsed query: AndQuery([BooleanQuery('comp', 1, fast=True)])# Parsed sort: NullSort()# convert: Hardlinking /home/myuser/BugDemo/MyArtist/MyAlbum/01 MyTrack.ogg# Sending event: write# Sending event: after_write# Sending event: after_convert# Sending event: cli_exit# The Result
ls -l ./path/to/Destination/MyArtist/MyAlbum/
# lrwxrwxrwx 2 myuser users 86 Mar 18 16:26 '01 MyTrack.ogg' -> '../../../MyTrack.ogg'
Notice that this symlink now points to nothing, as the original MyTrack.ogg would be at ../../../../../MyTrack.ogg. In other words, the relative path pointed to by the symlink was not updated to its new location.
The behavior that I would expect is either:
Before creating the new symlink, convert the referent to an absolute path, so that the new symlink points to the same file as the original
Or, even better, dereference the symlink and hardlink the referent to the new location
Setup
OS: NixOS 24.11
Python version: 3.12.8
beets version: 2.1.0 (from Nix package manager)
Turning off (other) plugins made problem go away: no
The text was updated successfully, but these errors were encountered:
The former would be a fix just for this module, while I would expect that the latter would fix the issue elsewhere in the codebase too, if it shows up anywhere. While I imagine that there shouldn't be any adverse consequences to that, I'm not familiar enough with the codebase to say for sure. If any devs want to weigh in, I'll write up the PR.
When converting with the hardlink option, existing relative symlinks in the original beets library will be converted to broken symlinks in the destination.
Problem
With the configuration:
Run the following commands:
Notice that this symlink now points to nothing, as the original
MyTrack.ogg
would be at../../../../../MyTrack.ogg
. In other words, the relative path pointed to by the symlink was not updated to its new location.The behavior that I would expect is either:
Setup
The text was updated successfully, but these errors were encountered: