Files
serato-doctor/docs/design/broken-symlinks.md
T
2026-07-01 07:32:07 -07:00

1.0 KiB

Broken Symlink Detection

Problem

Library migrations may leave symbolic links pointing to files or folders that no longer exist. The filesystem scanner previously skipped those links silently.

Architecture

One read-only filesystem traversal now returns audio tracks and broken symbolic links. Each finding preserves the link path and its raw target when the operating system can read it. The library and health report retain only immutable findings.

Broken links are reported separately and do not affect the reference-integrity score. The detector does not follow, recreate, remove, or rewrite any link.

Edge Cases

  • Relative and absolute link targets.
  • Links to missing files and missing directories.
  • Link targets that cannot be read due to an operating-system error.
  • Valid symlinks, which remain eligible for ordinary audio scanning.

Verification

Tests create synthetic valid and broken links in temporary directories, verify the raw target, and confirm health integration. Existing scanner behavior is preserved.