Compare commits

..

No commits in common. "015a54a6e4ddb3d2b0c6842da5c757640be40c8c" and "e1f88da0b70bbef2aaff966d6d48df379f3cf3c9" have entirely different histories.

View File

@ -274,7 +274,7 @@ TEMPLATE="${TEMPLATES[-1]}"
TEMPLATE_PATH="$(pvesm path $TEMPLATE_STORAGE:vztmpl/$TEMPLATE 2>/dev/null || echo "/var/lib/vz/template/cache/$TEMPLATE")" TEMPLATE_PATH="$(pvesm path $TEMPLATE_STORAGE:vztmpl/$TEMPLATE 2>/dev/null || echo "/var/lib/vz/template/cache/$TEMPLATE")"
# Check if template exists and is valid # Check if template exists and is valid
if ! pveam list "$TEMPLATE_STORAGE" | grep -q "$TEMPLATE" || ! (zstdcat "$TEMPLATE_PATH" | tar -tf - >/dev/null 2>&1); then if ! pveam list "$TEMPLATE_STORAGE" | grep -q "$TEMPLATE" || ! zstdcat "$TEMPLATE_PATH" | tar -tf - >/dev/null 2>&1; then
msg_warn "Template $TEMPLATE not found or appears to be corrupted. Re-downloading." msg_warn "Template $TEMPLATE not found or appears to be corrupted. Re-downloading."
[[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH" [[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH"