From eaf7a2904c0c609ee37467f45c2a630449461fb1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 11 Mar 2023 14:57:48 +0100 Subject: [PATCH] helpers: fix ynh_setup_source, 'source_id' may contain slashes x_x --- helpers/utils | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpers/utils b/helpers/utils index 4a964a14e..167b67d37 100644 --- a/helpers/utils +++ b/helpers/utils @@ -235,7 +235,8 @@ ynh_setup_source() { # (Unused?) mecanism where one can have the file in a special local cache to not have to download it... local local_src="/opt/yunohost-apps-src/${YNH_APP_ID}/${source_id}" - mkdir -p /var/cache/yunohost/download/${YNH_APP_ID}/ + # Gotta use this trick with 'dirname' because source_id may contain slashes x_x + mkdir -p $(dirname /var/cache/yunohost/download/${YNH_APP_ID}/${source_id}) src_filename="/var/cache/yunohost/download/${YNH_APP_ID}/${source_id}" if [ "$src_format" = "docker" ]; then