Skip to content

[BUG] "SAFETY BLOCK" error when processing files located in the Library Root #201

@preikschat

Description

@preikschat

What happened?

The Library Manager correctly identifies "loose" audio files in the root of a configured library (R:\organized_library), but fails to apply the fix.

The background worker generates a warning that the book path is "not under any configured library" and incorrectly "guesses" a parent UNC path (\10.148.58.50\Audio_RW_Curated) as the library root. When attempting to apply the fix, a SAFETY BLOCK error occurs because the application believes the new destination is outside of the authorized library boundaries.

Expected behavior

The application should recognize that files in the root of R:\organized_library are already within a configured library. When applying a fix, it should move/rename them into subfolders (based on the naming template) within that same library path without triggering a safety block.

Steps to reproduce

Map a network drive (e.g., R:) to a network share.

  1. Configure a Library Path in Settings as R:\organized_library.
  2. Place audio files directly into the root of R:\organized_library (not in subfolders).
  3. Run a Deep Library Scan.
  4. Navigate to Pending Fixes and click Apply All or the checkmark for a specific book.
  5. Observe the browser popup error: SAFETY BLOCK: Path outside library!.

Environment

  • Version: v0.9.0-beta.134
  • Platform: Windows / Bare metal (running via venv/python)
  • Library size: ~3 books (test case)

Logs

2026-04-06 12:02:58,611 - WARNING - Book path \10.148.58.50\Audio_RW_Curated\organized_library\Adrian J. Smith - The Nameless- The Complete Series (Books 1-4).m4b not under any configured library, guessing lib_path=\10.148.58.50\Audio_RW_Curated
2026-04-06 12:02:58,627 - INFO - PENDING APPROVAL: Unknown -> Adrian J. Smith (drastic=False)
...
2026-04-06 12:08:44,219 - ERROR - SAFETY BLOCK: Path outside library! old_in_lib=True, old_in_watch=False, new_in_lib=False

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions