fix something

This commit is contained in:
Ing 2024-04-17 02:45:36 +08:00
parent 99d0559df2
commit 31d36e2bee
2 changed files with 2 additions and 0 deletions

View File

@ -329,6 +329,7 @@ function getLogo() {
fi
STATUS=$(curl -skL --connect-timeout 10 -w "%{http_code}" "https://${fastest}/api/products/getPhoto?product=${MODEL/+/%2B}&type=img_s&sort=0" -o "${PART3_PATH}/logo.png")
if [ $? -ne 0 -o ${STATUS:-0} -ne 200 -o ! -f "${PART3_PATH}/logo.png" ]; then
rm -f "${PART3_PATH}/logo.png"
return 1
fi
convert -rotate 180 "${PART3_PATH}/logo.png" "${PART3_PATH}/logo.png" 2>/dev/null

View File

@ -2718,6 +2718,7 @@ function downloadExts() {
--progressbox "$(TEXT "Downloading ...")" 20 100
fi
if [ ${RET} -ne 0 -o ${STATUS:-0} -ne 200 ]; then
rm -f "${TMP_PATH}/${4}-${TAG}.zip"
MSG="$(printf "$(TEXT "Error downloading new version.\nError: %d:%d\n(Please via https://curl.se/libcurl/c/libcurl-errors.html check error description.)")" "${RET}" "${STATUS}")"
if [ "${5}" = "-1" ]; then
echo "${T} - ${MSG}"