From 246de6f866b435e8fabc58f36cf44491c3f75275 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Fri, 25 Nov 2016 00:15:03 +0100 Subject: [PATCH] Revert "[fix] Can't restore app on a root domain" --- src/yunohost/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index dc71642c4..caa38e95b 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -909,6 +909,10 @@ def app_checkurl(auth, url, app=None): raise MoulinetteError(errno.EINVAL, m18n.n('domain_unknown')) if domain in apps_map: + # Domain already has apps on sub path + if path == '/': + raise MoulinetteError(errno.EPERM, + m18n.n('app_location_install_failed')) # Loop through apps for p, a in apps_map[domain].items(): # Skip requested app checking @@ -918,7 +922,7 @@ def app_checkurl(auth, url, app=None): if path == p: raise MoulinetteError(errno.EINVAL, m18n.n('app_location_already_used')) - elif path.startswith(p) or p.startswith(path): + elif path.startswith(p): raise MoulinetteError(errno.EPERM, m18n.n('app_location_install_failed'))