From 9511e01f5a8f577fed65c867b5dfe7c40eddb4c2 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 27 Jan 2018 16:16:42 +0100 Subject: [PATCH] Add access to conf folder when executing change_url script --- src/yunohost/app.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 9ccc0886d..58c397542 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -485,6 +485,12 @@ def app_change_url(auth, app, domain, path): shutil.copytree(os.path.join(APPS_SETTING_PATH, app, "scripts"), os.path.join(APP_TMP_FOLDER, "scripts")) + if os.path.exists(os.path.join(APP_TMP_FOLDER, "conf")): + shutil.rmtree(os.path.join(APP_TMP_FOLDER, "conf")) + + shutil.copytree(os.path.join(APPS_SETTING_PATH, app, "conf"), + os.path.join(APP_TMP_FOLDER, "conf")) + # Execute App change_url script os.system('chown -R admin: %s' % INSTALL_TMP) os.system('chmod +x %s' % os.path.join(os.path.join(APP_TMP_FOLDER, "scripts")))