From da7728fe7458ca04d8df9095ab903aa68efdfe68 Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 17 Nov 2016 12:54:39 +0100 Subject: [PATCH] [fix] Can't restore app on a root domain --- src/yunohost/app.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index caa38e95b..dc71642c4 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -909,10 +909,6 @@ 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 @@ -922,7 +918,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): + elif path.startswith(p) or p.startswith(path): raise MoulinetteError(errno.EPERM, m18n.n('app_location_install_failed'))