fix _patch_legacy_helpers

This commit is contained in:
Kay0u 2021-03-16 16:28:12 +01:00
parent 2b947830aa
commit 3c3e8711ed
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D

View file

@ -1761,7 +1761,7 @@ def app_action_run(operation_logger, app, action, args=None):
if action_declaration.get("cwd"): if action_declaration.get("cwd"):
cwd = action_declaration["cwd"].replace("$app", app) cwd = action_declaration["cwd"].replace("$app", app)
else: else:
cwd = "/etc/yunohost/apps/" + app cwd = os.path.join(APPS_SETTING_PATH, app)
retcode = hook_exec( retcode = hook_exec(
path, path,
@ -3636,7 +3636,11 @@ def _patch_legacy_helpers(app_folder):
if not os.path.isfile(filename): if not os.path.isfile(filename):
continue continue
try:
content = read_file(filename) content = read_file(filename)
except Exception:
continue
replaced_stuff = False replaced_stuff = False
show_warning = False show_warning = False