Do not mark maps as done when fetching their pk3 failed.

May fix "missing screenshots" issue.
This commit is contained in:
Rudolf Polzer 2022-02-04 03:28:43 +01:00
parent 1007baeac7
commit 1169cae6f5

View File

@ -311,12 +311,14 @@ getthemap()
if ! curl -Lo "$bspdir/$M-$blobhash.pk3" "$url$M-$blobhash.pk3"; then if ! curl -Lo "$bspdir/$M-$blobhash.pk3" "$url$M-$blobhash.pk3"; then
rm -f "$bspdir/$M-$blobhash.pk3" rm -f "$bspdir/$M-$blobhash.pk3"
echo "WARNING: could not download $url$M-$blobhash.pk3, maybe not ready yet" echo "WARNING: could not download $url$M-$blobhash.pk3, maybe not ready yet"
getthemap_fail=true
return 0 return 0
fi fi
fi fi
if ! unzip -l "$bspdir/$M-$blobhash.pk3"; then if ! unzip -l "$bspdir/$M-$blobhash.pk3"; then
rm -f "$bspdir/$M-$blobhash.pk3" rm -f "$bspdir/$M-$blobhash.pk3"
echo "WARNING: could not download $url$M-$blobhash.pk3, invalid zip file" echo "WARNING: could not download $url$M-$blobhash.pk3, invalid zip file"
getthemap_fail=true
return 0 return 0
fi fi
} }