fix matching of descendants during delete
This commit is contained in:
parent
54cdfa4685
commit
19deeb9512
1 changed files with 2 additions and 1 deletions
|
|
@ -460,11 +460,12 @@ def remove_all(
|
|||
if hostname is None:
|
||||
hostname = config.hostname
|
||||
|
||||
location_dir = location if location.endswith("/") else location + "/"
|
||||
selector = and_(
|
||||
metadex.c.hostname == hostname,
|
||||
or_(
|
||||
metadex.c.location == location,
|
||||
metadex.c.location.startswith(location + "/", autoescape=True),
|
||||
metadex.c.location.startswith(location_dir, autoescape=True),
|
||||
),
|
||||
)
|
||||
stmt = select(metadex.c.location).where(selector)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue