From 1941cb35e84e0635bf81996352e1c5e436689efa Mon Sep 17 00:00:00 2001 From: pax Date: Fri, 17 Apr 2026 20:15:52 -0500 Subject: [PATCH] post_actions: drop dead try/except in is_in_library --- booru_viewer/gui/post_actions.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/booru_viewer/gui/post_actions.py b/booru_viewer/gui/post_actions.py index 8f18df5..bf87d58 100644 --- a/booru_viewer/gui/post_actions.py +++ b/booru_viewer/gui/post_actions.py @@ -21,11 +21,7 @@ def is_batch_message(msg: str) -> bool: return "/" in msg and any(c.isdigit() for c in msg.split("/")[0][-2:]) def is_in_library(path: Path, saved_root: Path) -> bool: - """Check if path is inside the library root.""" - try: - return path.is_relative_to(saved_root) - except (TypeError, ValueError): - return False + return path.is_relative_to(saved_root) class PostActionsController: