diff --git a/tools/bin/tp b/tools/bin/tp index 5f1a593..b35ea7e 100755 --- a/tools/bin/tp +++ b/tools/bin/tp @@ -51,7 +51,12 @@ case "$1" in continue fi - $CURL -o "$TP_DIR/ingress/$id.patch" "$HOMESERVER/media/v3/download/$server/$id" + if ! $CURL -o "$TP_DIR/ingress/$id.patch" "$HOMESERVER/media/v3/download/$server/$id"; then + rm "$TP_DIR"/ingress/$id.patch" + echo "Failed to fetch mxc://$server/$id." + echo "Will try again next time." + continue + fi count=$(cat "$TP_DIR/count.txt") count=$((count + 1))