+11
−5
+168
−0
Loading
Collection deletion checked only for active child collections, allowing nonrecursive requests to archive populated leaf collections while their resources remained active and linked to the archived collection. Reject nonrecursive deletion when any active resource remains, returning "collection has resources" before changing collection or resource state. Ignore deleted content when determining emptiness and preserve recursive handling of shared and unshared resources. Use exists() for both content checks so detecting children or resources does not load their complete result sets. Update the docstring and comments to explain active-content requirements and recursive shared-resource behavior. Add seven regression tests covering ordinary resources and files without resource deletion permission, shared resources, active children, empty collections, archived content, and recursive resource deletion. Verify that rejected requests preserve memberships, timestamps, and queued tasks. Validation: Ruff and diff whitespace checks passed. All 234 resource, RPC, and annotation tests passed using an isolated in-memory SQLite database.