attempt to fix recursion #2

This commit is contained in:
Alex
2023-05-29 21:22:10 -06:00
parent 50fe024930
commit 96efb520e7

View File

@@ -407,13 +407,17 @@ fetch_lists() {
fi
# Check if the file is empty or does not contain valid CSV content
if [ ! -s $ISHARE2_DIR"/$TYPE.csv" ] || ! validate_csv_file $ISHARE2_DIR"/$TYPE.csv"; then
if ! validate_csv_file $ISHARE2_DIR"/$TYPE.csv"; then
echo -e "${RED} [!] The downloaded file is empty or does not contain valid CSV content.${NO_COLOR}"
download_file_wget $URL $ISHARE2_DIR "$TYPE.csv"
fi
else
echo -e "${YELLOW} [!] The list of images $TYPE does not exist. ${NO_COLOR}"
download_file_wget $URL $ISHARE2_DIR "$TYPE.csv"
if ! validate_csv_file $ISHARE2_DIR"/$TYPE.csv"; then
echo -e "${RED} [!] The downloaded file is empty or does not contain valid CSV content.${NO_COLOR}"
download_file_wget $URL $ISHARE2_DIR "$TYPE.csv"
fi
fi
}