post_actions: drop dead try/except in is_in_library
This commit is contained in:
parent
c16c3a794a
commit
1941cb35e8
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user