From b678f8828a29022751cd3a60a75bbc39bf154222 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:34:04 +0200 Subject: [PATCH] Fix storage variable assignment in echo_storage_summary_from_file Corrects the logic for setting TEMPLATE_STORAGE and CONTAINER_STORAGE by checking if tpl and ct are set, respectively, and calling choose_and_set_storage_for_file if not. This ensures storage variables are properly initialized before use. --- misc/build.func | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index 0ad35c11..85c7c9ef 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1809,10 +1809,17 @@ echo_storage_summary_from_file() { local ct_store tpl_store ct_store=$(awk -F= '/^var_container_storage=/ {print $2; exit}' "$vars_file") tpl_store=$(awk -F= '/^var_template_storage=/ {print $2; exit}' "$vars_file") + if [ -n "$tpl" ]; then + TEMPLATE_STORAGE="$tpl" + else + choose_and_set_storage_for_file "$vf" template + fi - echo -e "\n${INFO}${BOLD}${DGN}Storage settings from ${vars_file}:${CL}" - echo -e " 📦 Container Storage: ${BGN}${ct_store:-}${CL}" - echo -e " 📦 Template Storage: ${BGN}${tpl_store:-}${CL}\n" + if [ -n "$ct" ]; then + CONTAINER_STORAGE="$ct" + else + choose_and_set_storage_for_file "$vf" container + fi } # ------------------------------------------------------------------------------