no time to read your whole code rn so not sure if its the same cause, but i recently had a similar issue with a whileread loop only running once. it was caused by something in the loop body reading from stdin and eating all the subsequent file names before the next read could get to it
no time to read your whole code rn so not sure if its the same cause, but i recently had a similar issue with a
while readloop only running once. it was caused by something in the loop body reading from stdin and eating all the subsequent file names before the next read could get to it