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

This commit is contained in:
Alexandre Aubin 2022-11-20 19:19:09 +01:00
parent 68c6e58e9c
commit 33be18bea2

View file

@ -2508,11 +2508,7 @@ def _get_conflicting_apps(domain, path, ignore_app=None):
for p, a in apps_map[domain].items():
if a["id"] == ignore_app:
continue
if path == 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):
if path == p or path == "/" or p == "/":
conflicts.append((p, a["id"], a["label"]))
return conflicts