Allow apps to be installed on a path sharing a common base, eg /foo and /foo2 (#1537)

This commit is contained in:
Alexandre Aubin 2022-11-26 00:17:26 +01:00 committed by GitHub
parent 70a8225b1d
commit ae5941116d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2508,11 +2508,7 @@ def _get_conflicting_apps(domain, path, ignore_app=None):
for p, a in apps_map[domain].items(): for p, a in apps_map[domain].items():
if a["id"] == ignore_app: if a["id"] == ignore_app:
continue continue
if path == p: if path == p or path == "/" or p == "/":
conflicts.append((p, a["id"], a["label"]))
# We also don't want conflicts with other apps starting with
# same name
elif path.startswith(p) or p.startswith(path):
conflicts.append((p, a["id"], a["label"])) conflicts.append((p, a["id"], a["label"]))
return conflicts return conflicts